<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi Daniel,</p>
<p><br>
</p>
<p>Great thanks very much, will give it a try.</p>
<p><br>
</p>
<p>Jon</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Sent:</b> 22 November 2016 18:46<br>
<b>To:</b> Jonathan Hunter; Kamailio SER - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"</font>
<div> </div>
</div>
<div>
<p>Hello,</p>
<p><br>
</p>
<p>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.</p>
<p><br>
</p>
<p>Can you give it a try?</p>
<p><br>
</p>
Some documentation can be found in the comments of the function used by this command:<br>
<br>
  - <a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399" id="LPlnk800914" previewremoved="true">
https://github.com/kamailio/kamailio/blob/master/modules/tm/rpc_uac.c#L399</a><br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<div class="moz-cite-prefix">On 22/11/2016 18:35, Jonathan Hunter wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Daniel,</p>
<p><br>
</p>
<p>Thanks here you go;</p>
<p><br>
</p>
<div>[root@POC_ProxyA kamailio]# kamctl mi t_uac_dlg INFO <a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>    \"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a>"\r\nTo:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\">sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\</a>""</div>
<div>404 Invalid local socket</div>
<div>[root@POC_ProxyA kamailio]# VERBOSE=1 kamctl mi t_uac_dlg INFO <a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>    \"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a>"\r\nTo:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\">sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\</a>""</div>
<div>database engine 'MYSQL' loaded</div>
<div>Control engine 'FIFO' loaded</div>
<div>entering fifo_cmd t_uac_dlg INFO <a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a> "From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a></div>
<div>To:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">sip:3003@193.144.1.112</a></div>
<div>Contact:<a class="moz-txt-link-freetext" href="sip:daemon@8.8.8.8">sip:daemon@8.8.8.8</a></div>
<div>"</div>
<div>404 Invalid local socket</div>
<div>FIFO command was:</div>
<div>:t_uac_dlg:kamailio_receiver_23469</div>
<div>INFO</div>
<div><a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">sip:3003@193.144.1.112</a></div>
<div>.</div>
<div><a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a></div>
<div>"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a></div>
<div>To:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">sip:3003@193.144.1.112</a></div>
<div>Contact:<a class="moz-txt-link-freetext" href="sip:daemon@8.8.8.8">sip:daemon@8.8.8.8</a></div>
<div>"</div>
<div><br>
</div>
<div><br>
</div>
Thanks
<p><br>
</p>
<p>Jon</p>
<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b> Daniel-Constantin Mierla
<a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Sent:</b> 22 November 2016 13:10<br>
<b>To:</b> Jonathan Hunter; Kamailio SER - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"</font>
<div> </div>
</div>
<div>
<p>Hello,</p>
<p><br>
</p>
<p>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:</p>
<p><br>
</p>
<p>VERBOSE=1 kamctl mi ...</p>
<p><br>
</p>
<p>It should print the command sent over the fifo file. Send the output here so I can check it.</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 21/11/2016 18:38, Jonathan Hunter wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello,</p>
<p><br>
</p>
<p>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.</p>
<p><br>
</p>
<p>Thanks again and sorry for the noise!</p>
<p><br>
</p>
<p>Jon</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div style="color:rgb(0,0,0)">
<div>
<p>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.</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 21/11/16 13:19, Jonathan Hunter wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello.</p>
<p><br>
</p>
<p>This is running from command line, not withing the configuration file, so I am testing before I try to add it in.</p>
<p><br>
</p>
<p>I have tried with single quotes, but not sure how to enclose the SIP headers and the r/n , can you please advise?</p>
<p><br>
</p>
<div>kamctl mi t_uac_dlg INFO <a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>    \"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a>"\r\nTo:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C">sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\</a>""</div>
<div><br>
</div>
<br>
<p>As I have tried;</p>
<p><br>
</p>
<p><span>kamctl mi t_uac_dlg 'INFO' '<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">sip:3003@193.144.1.112</a>' '.' '<a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>'    'From:<a class="moz-txt-link-freetext" href="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">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\</a>'</span><br>
</p>
<p><span><br>
</span></p>
<p><span>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?</span></p>
<p><span><br>
</span></p>
<p><span><span>/usr/sbin/kamailio[28999]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in
<a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060From:sip:1234@8.8.8.8rnTo:sip:3003@193.144.1.112rnContact:sip:daemon@8.8.8.8rn</a>'</span><br>
</span></p>
<p><span><br>
</span></p>
<p><br>
</p>
Its including them all as the local socket/port.
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Jon<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font color="#000000" face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b> Daniel-Constantin Mierla
<a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com"><miconda@gmail.com></a><br>
<b>Sent:</b> 21 November 2016 11:29<br>
<b>To:</b> Jonathan Hunter; Kamailio SER - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"</font>
<div> </div>
</div>
<div>
<p>Hello,<br>
</p>
<br>
<div class="moz-cite-prefix">On 20/11/16 16:12, Jonathan Hunter wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello,</p>
<p><br>
</p>
<p>Ok great thanks Daniel.</p>
<p><br>
</p>
<p>One final thing, I cant seem to get kamilio to except the parameter when I add the socket parameter in the kamctl mi <span style="">t_uac_dlg command.</span></p>
<p><span style=""><br>
</span></p>
<p><span style="">If I add as below I get 404 invalid local socket;</span></p>
<div><br>
</div>
<div> kamctl mi t_uac_dlg INFO <a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>    \"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a>"\r\nTo:<a class="moz-txt-link-freetext" href="sip:3003@193.144.1.112%5Cr%5CnContact:sip:daemon@8.8.8.8%5Cr%5Cn%5C">sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\</a>""</div>
</div>
</blockquote>
<br>
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.<br>
<br>
Also, can you try to enclose each parameter in single quotes -- then it's easier for the command line parser to identify the parameters.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<div>404 Invalid local socket</div>
<div><br>
</div>
<div>As its picking up the socket with the from address included as well, is this again around syntax?</div>
<div><br>
</div>
<div><span>ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in <a class="moz-txt-link-freetext" href="">
udp:10.70.1.136:5060</a>"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a></span><br>
</div>
<div><span><br>
</span></div>
<div><span>As it seems to pick socket up ok;</span></div>
<div><span><br>
</span></div>
<div><span>
<div>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></div>
<div>Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val
<a class="moz-txt-link-rfc2396E" href="sip:3003@193.144.1.112"><sip:3003@193.144.1.112></a></div>
<div>Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val <.></div>
<div>Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: DEBUG: mi_fifo [mi_parser.c:245]: mi_parse_tree(): adding node <> ; val
<a class="moz-txt-link-rfc2396E" href=""><udp:10.70.1.136:5060></a></div>
<div>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:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a></div>
<div>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</div>
<div>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</div>
<div>Nov 20 15:11:36 POC_ProxyA /usr/sbin/kamailio[23175]: ERROR: <core> [main.c:1128]: parse_phostport(): too many colons in
<a class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>"From:<a class="moz-txt-link-freetext" href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a></div>
<div><br>
</div>
<br>
</span></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
</div>
</div>
</div>
</body>
</html>