Hello,
I looked quickly at the code and the mi command should take the values
from the parameters. Can you run with debug=3 and get all the logs
messages to see if we can spot something threre.
Cheers,
Daniel
On 15/11/16 11:27, Jonathan Hunter wrote:
Hi,
Sorry Daniel, let me be clear.
Correct the To/From are not taken from the rpc command, the INFO is
triggered/sent but with the To/From of the new request coming in;
Below I dial 07917190438 from ext 209 and this INFO is sent;
INFO
sip:kamailio.org SIP/2.0
Via: SIP/2.0/UDP
8.8.8.8;branch=z9hG4bK63d7.374d4573000000000000000000000000.0
To: <sip:07917190438@8.8.8.8>
From: <sip:209@8.8.8.8>;tag=c32652d8e50f480c90e2f8379a0698aa-ea50
CSeq: 10 INFO
Call-ID: YWFhMmVmMzUxM2Q2YzUwMzZhOTFjNDc4OGZlYmM2N2I
Max-Forwards: 70
Content-Length: 0
User-Agent: HA PBX
However this command is triggered to send the INFO and the
To/From/Contact are not changed/added;
jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params":
["t_uac_dlg",
"INFO",
"sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');
I assumed (possibly incorrectly) you can get the command to overwrite
the current contents of the headers, so as above the RURI would change
to sip:3003@8.8.8.8 and the From to sip:1234@2.2.2.2 etc, however they
remain unchanged.
Does that make sense?
Thanks
Jon
------------------------------------------------------------------------
*From:* Daniel-Constantin Mierla <miconda(a)gmail.com>
*Sent:* 15 November 2016 10:12
*To:* Jonathan Hunter; Kamailio SER - Users Mailing List
*Subject:* Re: [SR-Users] Send SIP Info within a dialog using
$uac_req(method)="INFO"
Hello,
what do you mean by "with default parameters" in your last remark? Are
the To/From not taken from the rpc command?
Cheers,
Daniel
On 15/11/16 11:06, Jonathan Hunter wrote:
>
> Hi Daniel,
>
>
> That works in terms of clearing the error, however I just see
> kamailio send a SIP info message to
kamailio.org, as apposed to the
> RURI I provide, I presume again this will just be putting the
> t_uac_dlg parameters in the correct order?
>
>
> Parameters:
>
> *
>
> /method/ - request method
>
> *
>
> /RURI/ - request SIP URI
>
> *
>
> /NEXT HOP/ - next hop SIP URI (OBP); use “.” if no value.
>
> *
>
> /socket/ - local socket to be used for sending the request;
> use “.” if no value.
>
> *
>
> /headers/ - set of additional headers to be added to the request;
> at least “From” and “To” headers must be specify)
>
> *
>
> /body/ - (optional, may not be present) request body (if present,
> requires the “Content-Type” and “Content-length” headers)
>
> As looks like I am defining things correctly now but its not picking
> them up, again if I run manually it works in command line;
>
>
>
jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params":
["t_uac_dlg",
> "INFO",
>
"sip:3003@8.8.8.8",".",".","From:sip:1234@2.2.2.2","To:sip:3003@8.8.8.8","Contact:sip:1234@2.2.2.2"]}');
>
> All I see it fire is an INFO message to Request-Line: INFO
>
sip:kamailio.org SIP/2.0, with default parameters.
>
>
> Thanks
>
>
> Jon
>