<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>Hello,</p>
<p><br>
</p>
<p>One last question relating to this issue of sending SIP INFO within a dialog. (Sorry!)</p>
<p><br>
</p>
<p>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?</p>
<p><br>
</p>
<p>I have added <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
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?</span></p>
<p><br>
</p>
<p><br>
</p>
<p></p>
<div>event_route[dialog:start]</div>
<div>{</div>
<div>xlog("L_INFO", "We are getting here in event route\n")</div>
<div>xlog("L_INFO","We have here $dlg(to_uri) and $dlg(from_uri)\n");</div>
<div>xlog("L_INFO","to uri is $dlg(to_uri)\n");</div>
<div>xlog("L_INFO","to tag is <b>$dlg(to_tag)</b>\n");</div>
<div>xlog("L_INFO","from uri is $dlg(from_uri)\n");</div>
<div>xlog("L_INFO","from tag is $dlg(from_tag)\n");</div>
<div>xlog("L_INFO","callid is $dlg(callid)\n");</div>
<div><br>
</div>
<br>
<p></p>
<p></p>
<div>Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: We are getting here in event route</div>
<div>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</div>
<div>Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: to uri is sip:782607917190438@4.4.4.4:5060</div>
<div>Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>:<b> to tag is <null></b></div>
<div>Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from uri is sip:01162292700@8.8.8.8:5080</div>
<div>Nov 22 08:53:16 POC_ProxyA /usr/sbin/kamailio[9036]: INFO: <script>: from tag is as5a4ffcca</div>
<div><br>
</div>
<div>As when I do kamctl mi dlg_list I see the totag listed;</div>
<div><br>
</div>
<div><br>
</div>
<div>[root@POC_ProxyA kamailio]# kamctl mi dlg_list</div>
<div>dialog::  hash=24:6960</div>
<div><br>
</div>
<div>        from_uri:: sip:01162292700@8.8.8.8:5080</div>
<div>        from_tag:: as5a4ffcca</div>
<div>        </div>
<div>        to_uri:: sip:782607917190438@4.4.4.4:5060</div>
<div>       <b> to_tag:: 3688793392-940006</b></div>
<div>    </div>
Sorry again for another question on this theme but I feel I am 90% there thanks to your help.
<p></p>
<p><br>
</p>
<p></p>
<p>Also Is it possible to fire the exec command after the completion of the 200ok/ACK exchange ?</p>
<p><br>
</p>
<p>Many thanks</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> sr-users <sr-users-bounces@lists.sip-router.org> on behalf of Jonathan Hunter <hunterj91@hotmail.com><br>
<b>Sent:</b> 21 November 2016 17:38<br>
<b>To:</b> Kamailio SER - Users Mailing List; miconda@gmail.com<br>
<b>Subject:</b> Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"</font>
<div> </div>
</div>
<div>
<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\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><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'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'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 face="Calibri, sans-serif" color="#000000" 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/#!/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>
</div>
</div>
</div>
</body>
</html>