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
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:
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;
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)
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
From: Daniel-Constantin Mierla <miconda@gmail.com>
Sent: 15 November 2016 08:03
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"Hello,
iirc, the dots where used in MI protocol to provide empty values for parameters. Can you try in json with "" values instead of the dots, or enclose the dots in double quotes so the json document is valid?
Cheers,
Daniel
On 14/11/16 21:04, Jonathan Hunter wrote:
Hi Daniel,
I am just trying to put the mi command into jsonrpc_exec and looking at the documentation, Im not sure in this instance how to put down multiple parameters.
Running this command works in command line;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""
However if I then look to run it, I have tried the following (amongst other variations);
jsonrpc_exec('{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}');
I get;
ERROR: jsonrpc-s [jsonrpc-s_mod.c:1129]: jsonrpc_exec_ex(): invalid json doc [[{"jsonrpc":"2.0","method":"mi","params": ["t_uac_dlg", "INFO", "sip:3003@193.144.1.112",.,.,"From:sip:1234@8.8.8.8","To:sip:3003@193.144.1.112","Contact:sip:daemon@8.8.8.8"]}]]
Can you give me some clues on how to input the params as its not clear to me from kamailio or json rpc docs.
Many thanks
Jon
From: Daniel-Constantin Mierla <miconda@gmail.com>
Sent: 17 October 2016 09:45
To: Jonathan Hunter; Kamailio SER - Users Mailing List
Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"Hello,
if you want to run an MI command over RPC, you have to use 'mi' as the rpc command and the MI command as the first parameter, followed by the rest of the parameters for the command.
Cheers,
Daniel
On 14/10/16 14:23, Jonathan Hunter wrote:
Hi Daniel,
Also I am trying to fire that command using jsonrpc_exec and I keep getting;
jsonrpc_exec_ex(): method callback not found [t_uac_dlg]
I have tried with t.uac_dlg and get the same response, can you let me know if this command is support with this module on 4.3 please and if so what am I doing wrong with the syntax?
Thanks
Jon
From: hunterj91@hotmail.com
To: miconda@gmail.com; sr-users@lists.sip-router.org
Date: Fri, 14 Oct 2016 08:52:25 +0000
Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Thanks for the response, sorry I must of missed this!
I was thinking of using the t_uac_dlg command to generate the INFO message, but will this allow me to do it within an established INVITE dialog?
I am just worried that changing the CSEQ value will cause issues, so am I better looking to modify in a B2BUA rather than the proxy, or will the dialog module handle this?
Thanks
Jon
To: sr-users@lists.sip-router.org
From: miconda@gmail.com
Date: Thu, 6 Oct 2016 12:41:32 +0200
Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
uac_req_send() is able to send only initial requests (with follow up on auth challenge). It doesn't expose the ability to send requests within a dialog -- the functions exist in c (tm module), but not availble in config.
On the other hand, there should be a mi/rpc command exported by tm module that allows that -- it may be possible to do it from config file via jsonrpc-s module.
Cheers,
Daniel
On 29/09/16 21:41, Jonathan Hunter wrote:
Hi Guys,Is it still the case that when using uac_req_send, you cant send withing a specific dialog?I can modify call-id, but I presume tags may be more of a problem?
See old post below from 2015;> I am familiar with uac_req_send. but how do I send it with in a > specific dialog and with data in the INFO req ? sending a new request inside a dialog is not possible with uac_req_send(). It is not easy over all because you change the sequence order (CSeq value). Practically, you need to track how many requests you sent from the middle to update (and restore in reply) when caller or callee sends a new request. dialog module can track changes in CSeq for requests sent to callee, being used now for authentication of INVITE to another provider, when Kamailio adds the credentials. But for more you would need to extend the dialog module. I just need to send a SIP info within an established dialog to stop some function up stream, so wondered if this is still a blocker?Many thanksJon
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com