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 thanks Jon
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 thanks Jon
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
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 thanks
Jon
_______________________________________________ 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
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 thanks
Jon
_______________________________________________ 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
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 thanks Jon _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto: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://twitter.com/#%21/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
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.commailto:hunterj91@hotmail.com To: miconda@gmail.commailto:miconda@gmail.com; sr-users@lists.sip-router.orgmailto: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.orgmailto:sr-users@lists.sip-router.org From: miconda@gmail.commailto: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 thanks
Jon
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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.orgmailto: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.orgmailto: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
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 thanks Jon _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto: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://twitter.com/#%21/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
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
________________________________ 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"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"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.commailto: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.commailto:hunterj91@hotmail.com To: miconda@gmail.commailto:miconda@gmail.com; sr-users@lists.sip-router.orgmailto: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.orgmailto:sr-users@lists.sip-router.org From: miconda@gmail.commailto: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 thanks
Jon
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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.orgmailto: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.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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
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
*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 thanks Jon _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto: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://twitter.com/#%21/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
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@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"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.commailto: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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
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"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"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.commailto: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.commailto:hunterj91@hotmail.com To: miconda@gmail.commailto:miconda@gmail.com; sr-users@lists.sip-router.orgmailto: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.orgmailto:sr-users@lists.sip-router.org From: miconda@gmail.commailto: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 thanks
Jon
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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.orgmailto: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.orgmailto:sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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/#!/micondahttp://twitter.com/#%21/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
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@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
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- 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
Hello,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 15 November 2016 10:59 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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@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
-- 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
Hi Daniel,
Thanks again for the response, I presume I have to be careful with the characters and syntax for the exec command ?
I will try it out and let you know.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 16 November 2016 09:45 To: Jonathan Hunter; Kamailio SER - Users Mailingh List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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
Hi Daniel,
Figured out the syntax and its working great in terms of generating the SIP INFO message, just need to get it to send within dialog and I have a solution.
For reference the following works;
exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:$fu"\r\nTo:$tu\r\nContact:$ct\r\n\""", "$avp(test)");
Many thanks again.
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com Sent: 16 November 2016 12:06 To: Kamailio SER - Users Mailing List; miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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
Hello,
just to point out a trick that sometime can save backslash escaping of quotes. One can start the function parameters with single quote, then double quotes don't need to be escaped. Other blackslashes need to be escaped and it this case you need more because you want to propagate then to the command line.
Cheers, Daniel
On 16/11/16 19:39, Jonathan Hunter wrote:
Hi Daniel,
Figured out the syntax and its working great in terms of generating the SIP INFO message, just need to get it to send within dialog and I have a solution.
For reference the following works;
exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:$fu"\r\nTo:$tu\r\nContact:$ct\r\n\""", "$avp(test)");
Many thanks again.
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 16 November 2016 12:06 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 15 November 2016 10:59 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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@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
-- 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
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 17 November 2016 09:43 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
just to point out a trick that sometime can save backslash escaping of quotes. One can start the function parameters with single quote, then double quotes don't need to be escaped. Other blackslashes need to be escaped and it this case you need more because you want to propagate then to the command line.
Cheers, Daniel
On 16/11/16 19:39, Jonathan Hunter wrote:
Hi Daniel,
Figured out the syntax and its working great in terms of generating the SIP INFO message, just need to get it to send within dialog and I have a solution.
For reference the following works;
exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:$fu"\r\nTo:$tu\r\nContact:$ct\r\n\""", "$avp(test)");
Many thanks again.
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 16 November 2016 12:06 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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/#!/micondahttp://twitter.com/#%21/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
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 17 November 2016 09:43 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
just to point out a trick that sometime can save backslash escaping of quotes. One can start the function parameters with single quote, then double quotes don't need to be escaped. Other blackslashes need to be escaped and it this case you need more because you want to propagate then to the command line.
Cheers, Daniel
On 16/11/16 19:39, Jonathan Hunter wrote:
Hi Daniel,
Figured out the syntax and its working great in terms of generating the SIP INFO message, just need to get it to send within dialog and I have a solution.
For reference the following works;
exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:$fu"\r\nTo:$tu\r\nContact:$ct\r\n\""", "$avp(test)");
Many thanks again.
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 16 November 2016 12:06 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG:
<script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up ------------------------------------------------------------------------ *From:* Daniel-Constantin Mierla <miconda@gmail.com> *Sent:* 15 November 2016 10:59 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO" 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@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 >> -- 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
-- 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
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 21 November 2016 11:29 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 17 November 2016 09:43 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
just to point out a trick that sometime can save backslash escaping of quotes. One can start the function parameters with single quote, then double quotes don't need to be escaped. Other blackslashes need to be escaped and it this case you need more because you want to propagate then to the command line.
Cheers, Daniel
On 16/11/16 19:39, Jonathan Hunter wrote:
Hi Daniel,
Figured out the syntax and its working great in terms of generating the SIP INFO message, just need to get it to send within dialog and I have a solution.
For reference the following works;
exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . . \"From:$fu"\r\nTo:$tu\r\nContact:$ct\r\n\""", "$avp(test)");
Many thanks again.
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 16 November 2016 12:06 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello Daniel,
Sorry to bother you again, last time!
So the mi command line is;
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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
Which works fine, however I add to exec module and it doesnt like the syntax;
exec_avp("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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""", "$avp(test)");
I presume its due to the " and \r\n characters.
What should I modify them or surround them with to please the exec command, as I can see in documentation for variables its '' quotes, but not sure around characters.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 16 November 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,
as I can see in the logs, the rpc command fails to execute because it requires async processing which is not implemented by jsonrpc-s module. Then it is an INVITE received:
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there
A solution for now would be to run the mi command via exec module.
Cheers, Daniel
On 15/11/16 12:30, Jonathan Hunter wrote:
Hello,
Please see debug output for when I try and send the SIP INFO when I am initiating a new call.
I am just testing out the command currently, in practice I will look to inject the SIP INFO into an already formed dialog, so is the way I am trying to test cause me an issue?
I can see;
Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org
Which will be why its sending the sip info to sip:kamailio.org I presume.
See some output from the relevant process below;
Thanks
Jon
ct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: Try and issue command via RPC Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here 500 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here this rpc transport does not support async mode Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: route EXTENIN-We have an Invite here from 209-thirdlane check Hash table trans to see if there Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We can populate here with sip:209-thirdlane@192.33.132.215,sip:07917190438@192.33.132.215,MmU2NDI0MGNmZTVmZjE4ZWM0NzI5ZjcxYmExMzdkNGQ Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:249]: t_uac_prepare(): DEBUG:tm:t_uac: next_hop=sip:kamailio.orgsip:kamailio.org Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (_sip._udp.kamailio.org(22), 33), h=392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:741]: get_record(): lookup(_sip._udp.kamailio.org, 33) failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:864]: dns_cache_mk_bad_entry(): (_sip._udp.kamailio.org, 33, 60, 1) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:798]: dns_cache_add(): adding _sip._udp.kamailio.org(22) 33 (flags=1) at 392 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:537]: _dns_hash_find(): (kamailio.org(12), 1), h=235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:937]: get_record(): skipping 0 NS (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [resolve.c:952]: get_record(): parsing 0 ARs (p=0x9ed4ae, end=0x9ed4ae) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:1741]: dns_get_related(): (0x7fb9632c04c8 (kamailio.org, 1), 1, *(nil)) (0) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [dns_cache.c:840]: dns_cache_add_unsafe(): adding kamailio.org(12) 1 (flags=0) at 235 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c730fc8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [uac.c:150]: dlg2hash(): DEBUG: dlg2hash: 18155 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: <script>: We appear to have an entry for 209-thirdlane and its 10.70.1.129so modify Accordingly Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:1312]: t_newtran(): DEBUG: t_newtran: msg id=4 , global msg id=4 , T on entrance=(nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:466]: t_lookup_request(): t_lookup_request: start searching: hash=4096, isACK=0 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:424]: matching_3261(): DEBUG: RFC3261 transaction matching failed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_lookup.c:648]: t_lookup_request(): DEBUG: t_lookup_request: no transaction found Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_hooks.c:358]: run_reqin_callbacks_internal(): DBG: trans=0x7fb9632c6558, callback type 1, id 0 entered Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [md5utils.c:67]: MD5StringArray(): MD5 calculated: ede2024c259a7db0dd7350b8d0d986f8 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:321]: t_relay_to(): SER: new INVITE Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [mem/shm_mem.c:101]: _shm_resize(): WARNING:vqm_resize: resize(0) called Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:647]: _reply_light(): DEBUG: reply sent out. buf=0x7fb96c9e0340: SIP/2.0 100 Trying Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_reply.c:657]: _reply_light(): DEBUG: _reply_light: finished Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <script>: new branch [0] to sip:07917190438@10.70.1.129 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: siputils [checks.c:97]: has_totag(): no totag Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [forward.c:174]: get_out_socket(): socket determined: 0x7fb96c731808 Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: tm [t_funcs.c:368]: t_relay_to(): SER: new transaction fwd'ed Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [usr_avp.c:631]: destroy_avp_list(): destroying list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil) Oct 7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: DEBUG: <core> [receive.c:278]: receive_msg(): cleaning up
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 15 November 2016 10:59 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
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"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"https://outlook.live.com/owa/?path=/mail/AQMkADAwATE0YzUwLWUxMjQtMzE3Yy0wMAItMDAKAC4AAAN%2F3kvE%2FPvCRZG1c9k9YgOnAQChqxR4ZvI4ToC2kdUvgxopAAACP%2FMAAAA%3D/rp]}');
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@gmail.commailto:miconda@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"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
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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/#!/micondahttp://twitter.com/#%21/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/#!/micondahttp://twitter.com/#%21/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
Hello,
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060
"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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 21 November 2016 11:29 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 21 November 2016 11:29 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- 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
Hello,
One last question relating to this issue of sending SIP INFO within a dialog. (Sorry!)
As you know I now have t_uac_dlg working with the exec module to create the SIP INFO, however how do I inject it effectively within the dialog?
I have added event_route[dialog:start] as thought this would be a good point to send prior to the ACK and just checking I get all the tags for the dialog, however it doesnt seem to capture the to_tag when its hit, am I missing something in config here or am I calling in in wrong place?
event_route[dialog:start] { xlog("L_INFO", "We are getting here in event route\n") xlog("L_INFO","We have here $dlg(to_uri) and $dlg(from_uri)\n"); xlog("L_INFO","to uri is $dlg(to_uri)\n"); xlog("L_INFO","to tag is $dlg(to_tag)\n"); xlog("L_INFO","from uri is $dlg(from_uri)\n"); xlog("L_INFO","from tag is $dlg(from_tag)\n"); xlog("L_INFO","callid is $dlg(callid)\n");
Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: We are getting here in event route Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: We have here sip:782607917190438@4.4.4.4:5060 and sip:01162292700@8.8.8.8:5080 Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: to uri is sip:782607917190438@4.4.4.4:5060 Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: to tag is <null> Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from uri is sip:01162292700@8.8.8.8:5080 Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from tag is as5a4ffcca
As when I do kamctl mi dlg_list I see the totag listed;
[root@POC_ProxyA kamailio]# kamctl mi dlg_list dialog:: hash=24:6960
from_uri:: sip:01162292700@8.8.8.8:5080 from_tag:: as5a4ffcca
to_uri:: sip:782607917190438@4.4.4.4:5060 to_tag:: 3688793392-940006
Sorry again for another question on this theme but I feel I am 90% there thanks to your help.
Also Is it possible to fire the exec command after the completion of the 200ok/ACK exchange ?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com Sent: 21 November 2016 17:38 To: Kamailio SER - Users Mailing List; miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 21 November 2016 11:29 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- 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
Hello,
I am trying to figure out why the kamctl is not passing further the params. Can you set VERBOSE=1 in kamctlrc or just run like:
VERBOSE=1 kamctl mi ...
It should print the command sent over the fifo file. Send the output here so I can check it.
Cheers, Daniel
On 21/11/2016 18:38, Jonathan Hunter wrote:
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 21 November 2016 11:29 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- 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
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 22 November 2016 13:10 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
I am trying to figure out why the kamctl is not passing further the params. Can you set VERBOSE=1 in kamctlrc or just run like:
VERBOSE=1 kamctl mi ...
It should print the command sent over the fifo file. Send the output here so I can check it.
Cheers, Daniel
On 21/11/2016 18:38, Jonathan Hunter wrote:
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n<sip:1234@8.8.8.8%27r%5Cn%27To:sip:3003@193.144.1.112%27%5Cr%5Cn%27Contact:sip:daemon@8.8.8.8%27%5Cr%5Cn%5C>'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 21 November 2016 11:29 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 13:10 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
I am trying to figure out why the kamctl is not passing further the params. Can you set VERBOSE=1 in kamctlrc or just run like:
VERBOSE=1 kamctl mi ...
It should print the command sent over the fifo file. Send the output here so I can check it.
Cheers, Daniel
On 21/11/2016 18:38, Jonathan Hunter wrote:
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 21 November 2016 11:29 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- 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
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 13:10 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
I am trying to figure out why the kamctl is not passing further the params. Can you set VERBOSE=1 in kamctlrc or just run like:
VERBOSE=1 kamctl mi ...
It should print the command sent over the fifo file. Send the output here so I can check it.
Cheers, Daniel
On 21/11/2016 18:38, Jonathan Hunter wrote:
Hello,
Thanks Daniel, knowing how I should specify all the parameters would be great, just a syntax example, in particular when defining all the sip headers and why their are double quotes/single quotes or what best method is.
Thanks again and sorry for the noise!
Jon
something seems to be strange with interpreting the parameters from command line and forwarding them to kamailio. I will dig a bit into kamctl and come back with some hints.
Cheers, Daniel
On 21/11/16 13:19, Jonathan Hunter wrote:
Hello.
This is running from command line, not withing the configuration file, so I am testing before I try to add it in.
I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
As I have tried;
kamctl mi t_uac_dlg 'INFO' 'sip:3003@193.144.1.112' '.' 'udp:10.70.1.136:5060' 'From:sip:1234@8.8.8.8'r\n'To:sip:3003@193.144.1.112'\r\n'Contact:sip:daemon@8.8.8.8'\r\n<sip:1234@8.8.8.8%27r%5Cn%27To:sip:3003@193.144.1.112%27%5Cr%5Cn%27Contact:sip:daemon@8.8.8.8%27%5Cr%5Cn%5C>'
And still get invalid socket, as it is including all the SIP headers in with the port parameter so I presume I am missing an operator?
/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn'
Its including them all as the local socket/port.
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 21 November 2016 11:29 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
On 20/11/16 16:12, Jonathan Hunter wrote:
Hello,
Ok great thanks Daniel.
One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi t_uac_dlg command.
If I add as below I get 404 invalid local socket;
kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>""
do you run this command from command line or from kamailio.cfg? I think it's good to be sure it works from command line.
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.
Cheers, Daniel
404 Invalid local socket
As its picking up the socket with the from address included as well, is this again around syntax?
ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
As it seems to pick socket up ok;
Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <INFO> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val sip:3003@193.144.1.112sip:3003@193.144.1.112 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.> Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val udp:10.70.1.136:5060 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <From:sip:1234@8.8.8.8 Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:84]: mi_parse_node(): end of fifo input tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [fifo_fnc.c:507]: mi_fifo_server(): done parsing the mi tree Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in udp:10.70.1.136:5060"From:sip:1234@8.8.8.8
-- Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/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/#!/micondahttp://twitter.com/#%21/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
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote:
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 25 November 2016 18:55 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 18:46 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:24 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote:
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 25 November 2016 18:55 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 18:46 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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 twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello,
Ok cool I will look at it, will it help with syntax issues I have seen with the double quotes so far?
Many thanks
Jon
Get Outlook for iOShttps://aka.ms/o0ukef
On Thu, Dec 1, 2016 at 12:31 PM +0000, "Daniel-Constantin Mierla" <miconda@gmail.commailto:miconda@gmail.com> wrote:
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 01 December 2016 12:31 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hi Daniel,
I can see when people are using curl they can define content-type ;
--header 'Content-Type: application/json'
However is this possible within the jsonrpc_exec command, as this seems to set the body.
Can you define the Content-Type before firing the command?
Thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com Sent: 01 December 2016 16:12 To: Kamailio SER - Users Mailing List; miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 01 December 2016 12:31 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hello,
this is only when you do jsonrpc over http, but it is not the case here. See my previous response in this discussion thread.
Cheers, Daniel
On 02/12/2016 15:28, Jonathan Hunter wrote:
Hi Daniel,
I can see when people are using curl they can define content-type ;
/--header 'Content-Type: application/json'/ However is this possible within the jsonrpc_exec command, as this seems to set the body.
Can you define the Content-Type before firing the command?
Thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 01 December 2016 16:12 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:31 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:24 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote:
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 25 November 2016 18:55 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 18:46 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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 twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".",
"From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote:
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:31 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:24 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote:
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 25 November 2016 18:55 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 18:46 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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 twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello,
Ok thanks for that, it works perfectly.
I am generating the SIP INFO message, on receipt of a 200ok, which is being triggered by the event_route[dialog:start].
One last thing, is it possible to trigger /capture the event of the ACK being received for the 200 ok ?
As ideally I want to send SIP INFO after the ACK has been sent, however currently I am triggering on receipt of the 200ok, so dialog is started.
Can I have;
INVITE--->
<---200OK
ACK--->
INFO---->
So in effect RELAY the ACK, then trigger this SIP INFO to be sent?
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 05 December 2016 10:32 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".", "From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote: Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:31 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hello,
the ACK for requests within dialogs is routed via route[WITHINDLG], if it has a Route header -- also you can check if it belongs to an dialog -- dialog module should export a function for that.
Cheers, Daniel
On 05/12/2016 14:13, Jonathan Hunter wrote:
Hello,
Ok thanks for that, it works perfectly.
I am generating the SIP INFO message, on receipt of a 200ok, which is being triggered by the event_route[dialog:start].
One last thing, is it possible to trigger /capture the event of the ACK being received for the 200 ok ?
As ideally I want to send SIP INFO after the ACK has been sent, however currently I am triggering on receipt of the 200ok, so dialog is started.
Can I have;
INVITE--->
<---200OK
ACK--->
INFO---->
So in effect RELAY the ACK, then trigger this SIP INFO to be sent?
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 05 December 2016 10:32 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".",
"From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote:
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:31 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 01 December 2016 12:24 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote:
Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
*From:* sr-users sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.com *Sent:* 25 November 2016 18:55 *To:* Kamailio SER - Users Mailing List; miconda@gmail.com *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 22 November 2016 18:46 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
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 twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello,
I had been testing with ACK within that route, but in the ideal scenario I want to proxy the ACK, then follow that with the SIP INFO, where as at the moment it sends at same time, once it matches.
I wondered if there is an event route I can trigger once I know the ACK has been relayed?
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 05 December 2016 13:54 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
the ACK for requests within dialogs is routed via route[WITHINDLG], if it has a Route header -- also you can check if it belongs to an dialog -- dialog module should export a function for that.
Cheers, Daniel
On 05/12/2016 14:13, Jonathan Hunter wrote:
Hello,
Ok thanks for that, it works perfectly.
I am generating the SIP INFO message, on receipt of a 200ok, which is being triggered by the event_route[dialog:start].
One last thing, is it possible to trigger /capture the event of the ACK being received for the 200 ok ?
As ideally I want to send SIP INFO after the ACK has been sent, however currently I am triggering on receipt of the 200ok, so dialog is started.
Can I have;
INVITE--->
<---200OK
ACK--->
INFO---->
So in effect RELAY the ACK, then trigger this SIP INFO to be sent?
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 05 December 2016 10:32 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".", "From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote: Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:31 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
Hello,
you can reorganize the config in order to execute t_relay() for ACK, then you can do your stuff after it.
if is ack {
t_relay();
custom stuff
exit;
}
Cheers, Daniel
On 05/12/2016 15:03, Jonathan Hunter wrote:
Hello,
I had been testing with ACK within that route, but in the ideal scenario I want to proxy the ACK, then follow that with the SIP INFO, where as at the moment it sends at same time, once it matches.
I wondered if there is an event route I can trigger once I know the ACK has been relayed?
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 05 December 2016 13:54 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
the ACK for requests within dialogs is routed via route[WITHINDLG], if it has a Route header -- also you can check if it belongs to an dialog -- dialog module should export a function for that.
Cheers, Daniel
On 05/12/2016 14:13, Jonathan Hunter wrote:
Hello,
Ok thanks for that, it works perfectly.
I am generating the SIP INFO message, on receipt of a 200ok, which is being triggered by the event_route[dialog:start].
One last thing, is it possible to trigger /capture the event of the ACK being received for the 200 ok ?
As ideally I want to send SIP INFO after the ACK has been sent, however currently I am triggering on receipt of the 200ok, so dialog is started.
Can I have;
INVITE--->
<---200OK
ACK--->
INFO---->
So in effect RELAY the ACK, then trigger this SIP INFO to be sent?
Thanks
Jon
*From:* Daniel-Constantin Mierla miconda@gmail.com *Sent:* 05 December 2016 10:32 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".",
"From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote:
Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO:
<script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}} Thanks Jon ------------------------------------------------------------------------ *From:* Daniel-Constantin Mierla <miconda@gmail.com> *Sent:* 01 December 2016 12:31 *To:* Jonathan Hunter; Kamailio SER - Users Mailing List *Subject:* Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO" Hello, tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation. Cheers, Daniel On 01/12/2016 13:28, Jonathan Hunter wrote: > > Hello, > > > I am currently still using the exec module, so within the .cfg > file, as when using jsonrpc-s its coming up with the async command > issue again, I presume this will still be the case? > > > Ok I will try with the combinations you mention. > > > Many thanks > > > Jon > > > > ------------------------------------------------------------------------ > *From:* Daniel-Constantin Mierla <miconda@gmail.com> > *Sent:* 01 December 2016 12:24 > *To:* Jonathan Hunter; Kamailio SER - Users Mailing List > *Subject:* Re: [SR-Users] Send SIP Info within a dialog using > $uac_req(method)="INFO" > > > Hello, > > > are you still trying with MI command via kamctl? Not with the > jsonrpc-s module and tm.t_uac_start? > > > When double quotes disappear is likely due to command line > interpreter, so you need to put two of them for each one you have > now, then ones than need to stay should be with more backslashes. > > > Also, you can try to use single quotes to enclose the parameter > values and let the double quotes in the content of the parameter. > > > Cheers, > Daniel > > > On 30/11/2016 15:38, Jonathan Hunter wrote: >> Hi, >> >> I am just testing with the mi t_uac_dlg command, and I am trying >> to create an additional header, which is sent in the SIP INFO >> message and actually contains double quotes. >> >> So in my kamailio.cfg script file I set the variable; >> >> >> $var(testjon8) = "p1=\"STOP\""; >> >> xlog("L_INFO","We are going to try and use $var(testjon8)\n"); >> >> And when seeing in the logs I see it states; >> >> We are going to try and use p1="STOP" >> >> And p1="STOP" is exactly what I want. >> >> However when I generate the SIP INFO message, and check on the >> wire using wireshark I see; >> >> Event:p1=STOP >> >> So it doesnt have the double quotes I would like. >> >> How can I escape them so the t_uac_dlg command includes them? >> >> The portion where this header is generated in the command is; >> >> >> exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . >> \\\"From:'$var(testjon)'\"\\r\\nTo:$var(testjon2)\\r\\nCall-ID:$var(testjon3)\\r\\nAllow:$var(Allow)\\r\\nContact:$var(testjon4)\\r\\nEvent:$var(testjon8)\\r\\n\\\"\"", >> "$avp(test)"); >> >> >> >> And also running debug I see it as Event:p1="STOP"\r\n\"" >> >> >> Can you tell me how I can escape " so its actually within the SIP >> header itself? >> >> Many thanks >> >> Jon >> >> >> >> ------------------------------------------------------------------------ >> *From:* sr-users <sr-users-bounces@lists.sip-router.org> on behalf >> of Jonathan Hunter <hunterj91@hotmail.com> >> *Sent:* 25 November 2016 18:55 >> *To:* Kamailio SER - Users Mailing List; miconda@gmail.com >> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using >> $uac_req(method)="INFO" >> >> >> Hi Daniel, >> >> >> Great thanks very much, will give it a try. >> >> >> Jon >> >> >> >> ------------------------------------------------------------------------ >> *From:* Daniel-Constantin Mierla <miconda@gmail.com> >> *Sent:* 22 November 2016 18:46 >> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List >> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using >> $uac_req(method)="INFO" >> >> >> Hello, >> >> >> got a bit of time to look at the code and discovered that there is >> a rpc command tm.t_uac_start added by ser guys that might get you >> moving forward. It is not waiting for the reply of the generated >> request and you can use it with json rpc exec function in the >> config, so it avoids using exec. >> >> >> Can you give it a try? >> >> >> Some documentation can be found in the comments of the function >> used by this command: >> >> - >> https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399 >> >> Cheers, >> Daniel >> >> >> On 22/11/2016 18:35, Jonathan Hunter wrote: >>> >>> Hi Daniel, >>> >>> >>> Thanks here you go; >>> >>> >>> [root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO >>> sip:3003@193.144.1.112 . udp:10.70.1.136:5060 >>> \"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\"" >>> 404 Invalid local socket >>> [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO >>> sip:3003@193.144.1.112 . udp:10.70.1.136:5060 >>> \"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\"" >>> database engine 'MYSQL' loaded >>> Control engine 'FIFO' loaded >>> entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . >>> udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 >>> To:sip:3003@193.144.1.112 >>> Contact:sip:daemon@8.8.8.8 >>> " >>> 404 Invalid local socket >>> FIFO command was: >>> :t_uac_dlg:kamailio_receiver_23469 >>> INFO >>> sip:3003@193.144.1.112 >>> . >>> udp:10.70.1.136:5060 >>> "From:sip:1234@8.8.8.8 >>> To:sip:3003@193.144.1.112 >>> Contact:sip:daemon@8.8.8.8 >>> " >>> >>> >>> Thanks >>> >>> >>> Jon >>> >> 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 > twitter.com/miconda -- linkedin.com/in/miconda > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
Hello,
Perfect that all works great, I can trigger a SIP INFO message as required.
Sorry for hassling you so much!
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: 06 December 2016 07:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
you can reorganize the config in order to execute t_relay() for ACK, then you can do your stuff after it.
if is ack {
t_relay();
custom stuff
exit;
}
Cheers, Daniel
On 05/12/2016 15:03, Jonathan Hunter wrote:
Hello,
I had been testing with ACK within that route, but in the ideal scenario I want to proxy the ACK, then follow that with the SIP INFO, where as at the moment it sends at same time, once it matches.
I wondered if there is an event route I can trigger once I know the ACK has been relayed?
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 05 December 2016 13:54 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
the ACK for requests within dialogs is routed via route[WITHINDLG], if it has a Route header -- also you can check if it belongs to an dialog -- dialog module should export a function for that.
Cheers, Daniel
On 05/12/2016 14:13, Jonathan Hunter wrote:
Hello,
Ok thanks for that, it works perfectly.
I am generating the SIP INFO message, on receipt of a 200ok, which is being triggered by the event_route[dialog:start].
One last thing, is it possible to trigger /capture the event of the ACK being received for the 200 ok ?
As ideally I want to send SIP INFO after the ACK has been sent, however currently I am triggering on receipt of the 200ok, so dialog is started.
Can I have;
INVITE--->
<---200OK
ACK--->
INFO---->
So in effect RELAY the ACK, then trigger this SIP INFO to be sent?
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 05 December 2016 10:32 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
all the headers must be in a single parameter, I see that you provide headers one by one in the params array. Try:
jsonrpc_exec(' { "jsonrpc":"2.0", "method":"tm.t_uac_start", "params": [ "INFO", "$dlg(to_uri)", ".", ".", "From:$var(testjon)\r\nTo:$var(testjon2)\r\nContact:$var(testjon4)\r\nContent-Type: application/json\r\nContent-Length: 0\r\n" ] } ');
Cheers, Daniel
On 01/12/2016 17:12, Jonathan Hunter wrote: Hi Daniel,
I am trying tm.t_uac_start and its stating Content-Type Missing, I have tried to add to params but it doesnt like it, where should it be defined?
Command below;
jsonrpc_exec('{"jsonrpc":"2.0","method":"tm.t_uac_start","params": ["INFO", "$dlg(to_uri)",".",".","From:$var(testjon)\r\n","To:$var(testjon2)\r\n","Contact:$var(testjon4)\r\n","Content-Type: application/json\r\n","Content-Length: 0\r\n"]}');
And logs;
Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here Content-Type missing Dec 1 16:09:15 POC_ProxyA /usr/sbin/kamailio[11883]: INFO: <script>: getting here {"jsonrpc":"2.0","error":{"code":-32000,"message":"Execution Error"}}
Thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:31 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
tm.t_uac_start is another rpc command than what was tried before, this one doesn't do async operation.
Cheers, Daniel
On 01/12/2016 13:28, Jonathan Hunter wrote:
Hello,
I am currently still using the exec module, so within the .cfg file, as when using jsonrpc-s its coming up with the async command issue again, I presume this will still be the case?
Ok I will try with the combinations you mention.
Many thanks
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 01 December 2016 12:24 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
are you still trying with MI command via kamctl? Not with the jsonrpc-s module and tm.t_uac_start?
When double quotes disappear is likely due to command line interpreter, so you need to put two of them for each one you have now, then ones than need to stay should be with more backslashes.
Also, you can try to use single quotes to enclose the parameter values and let the double quotes in the content of the parameter.
Cheers, Daniel
On 30/11/2016 15:38, Jonathan Hunter wrote: Hi,
I am just testing with the mi t_uac_dlg command, and I am trying to create an additional header, which is sent in the SIP INFO message and actually contains double quotes.
So in my kamailio.cfg script file I set the variable;
$var(testjon8) = "p1="STOP"";
xlog("L_INFO","We are going to try and use $var(testjon8)\n");
And when seeing in the logs I see it states;
We are going to try and use p1="STOP"
And p1="STOP" is exactly what I want.
However when I generate the SIP INFO message, and check on the wire using wireshark I see;
Event:p1=STOP
So it doesnt have the double quotes I would like.
How can I escape them so the t_uac_dlg command includes them?
The portion where this header is generated in the command is;
exec_avp("kamctl mi t_uac_dlg INFO $dlg(to_uri) . . \"From:'$var(testjon)'"\r\nTo:$var(testjon2)\r\nCall-ID:$var(testjon3)\r\nAllow:$var(Allow)\r\nContact:$var(testjon4)\r\nEvent:$var(testjon8)\r\n\""", "$avp(test)");
And also running debug I see it as Event:p1="STOP"\r\n""
Can you tell me how I can escape " so its actually within the SIP header itself?
Many thanks
Jon
________________________________ From: sr-users sr-users-bounces@lists.sip-router.orgmailto:sr-users-bounces@lists.sip-router.org on behalf of Jonathan Hunter hunterj91@hotmail.commailto:hunterj91@hotmail.com Sent: 25 November 2016 18:55 To: Kamailio SER - Users Mailing List; miconda@gmail.commailto:miconda@gmail.com Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hi Daniel,
Great thanks very much, will give it a try.
Jon
________________________________ From: Daniel-Constantin Mierla miconda@gmail.commailto:miconda@gmail.com Sent: 22 November 2016 18:46 To: Jonathan Hunter; Kamailio SER - Users Mailing List Subject: Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"
Hello,
got a bit of time to look at the code and discovered that there is a rpc command tm.t_uac_start added by ser guys that might get you moving forward. It is not waiting for the reply of the generated request and you can use it with json rpc exec function in the config, so it avoids using exec.
Can you give it a try?
Some documentation can be found in the comments of the function used by this command:
- https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399
Cheers, Daniel
On 22/11/2016 18:35, Jonathan Hunter wrote:
Hi Daniel,
Thanks here you go;
[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" 404 Invalid local socket [root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "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<sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C>"" database engine 'MYSQL' loaded Control engine 'FIFO' loaded entering fifo_cmd t_uac_dlg INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 " 404 Invalid local socket FIFO command was: :t_uac_dlg:kamailio_receiver_23469 INFO sip:3003@193.144.1.112 . udp:10.70.1.136:5060 "From:sip:1234@8.8.8.8 To:sip:3003@193.144.1.112 Contact:sip:daemon@8.8.8.8 "
Thanks
Jon
Daniel-Constantin Mierla http://twitter.com/#!/micondahttp://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
-- Daniel-Constantin Mierla twitter.com/miconda -- linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.comhttp://www.kamailioworld.com