<div dir="ltr">Hi,<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/10 Juha Heinanen <span dir="ltr">&lt;<a href="mailto:jh@tutpro.com" target="_blank">jh@tutpro.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">Juha Heinanen writes:<br>
<br>
&gt; i tested and even when url path field contains escaped chars.  however,<br>
&gt; i started to get these to syslog every 20 seconds<br>
&gt;<br>
&gt; Apr 10 12:17:08 wheezy1 /usr/sbin/sip-proxy[3900]: ERROR: nathelper [nathelper.c:2018]: can&#39;t parse contact uri<br>
&gt;<br>
&gt;<br>
&gt; most likely due to nat pinging.  i haven&#39;t checked yet where they come<br>
&gt; from.  contact field of the ua does not have any escaped chars in it.<br>
<br>
</div>i added the uri to the error message and got:<br>
<br>
nathelper [nathelper.c:2019]: can&#39;t parse contact uri &#39;sip:192.98.102.11:35453%3Btransport%3Dtcp&#39;<br>
<br></blockquote><div><br></div><div style>That is a wrong formed URI but a right formed URI parameter. The right URI format for the above is:</div><div style><br></div><div style>sip:192.98.102.11:35453;transport=tcp<br>
</div><div style><br></div><div style>While the right format for the same info when it is used as an URI parameter is:</div><div style><br></div><div style>sip:192.98.102.11:35453%3Btransport%3Dtcp<br></div><div style> </div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
single quotes are from my LM_ERR below, i.e., they are not in the uri<br>
itself.  the uri in question is received uri and the call in nathelper.c<br>
is this:<br>
<br>
                        if (parse_uri(c.s, c.len, &amp;curi) &lt; 0) {<br>
                            LM_ERR(&quot;can&#39;t parse contact uri &#39;%.*s&#39;\n&quot;,<br>
                                   c.len, c.s);<br>
<br>
so there clearly is a bug in parse_uri function.  it cannot handle<br>
escaped chars.<br>
<br>
when i have time, i&#39;ll add tracker issue about it.<br>
<div class=""><div class="h5"><br>
-- juha<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>José Luis Millán
</div></div>