<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p><br>
</p>
<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
cite="mid:AM4PR0201MB216233816AF8838FB65A103FBDB50@AM4PR0201MB2162.eurprd02.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<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>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">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">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">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
style="font-size:11pt" face="Calibri, sans-serif"
color="#000000"><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
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:3003@193.144.1.112">
sip:3003@193.144.1.112</a> . <a
moz-do-not-send="true"
class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>
\"From:<a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="sip:1234@8.8.8.8">sip:1234@8.8.8.8</a>"\r\nTo:<a
moz-do-not-send="true"
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
moz-do-not-send="true"
class="moz-txt-link-freetext" href="">
udp:10.70.1.136:5060</a>"From:<a
moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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
moz-do-not-send="true"
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 moz-do-not-send="true"
class="moz-txt-link-freetext" href="">udp:10.70.1.136:5060</a>"From:<a
moz-do-not-send="true"
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>
</body>
</html>