<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>iirc, set_contact_alias() is not checking the source IP and
contact address.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 29.06.17 02:24, David Villasmil
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFGRPVqKm2yBrZp68OiMnQDruoa73ByuUT31eD9F8s+yTK96cg@mail.gmail.com">
<div dir="ltr">Hello guys,
<div><br>
</div>
<div>Nevermind, i changed </div>
<div><br>
</div>
<div><span style="font-size:12.8px">add_contact_alias()</span><br>
</div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">for</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">add_rcv_param()</span><br>
</div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">And kamailio seems happy
now, still testing, though.</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div><span style="font-size:12.8px">thanks!</span></div>
</div>
<div hspace="streak-pt-mark" style="max-height:1px"><img alt=""
style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&type=zerocontent&guid=da84d74b-70af-4db6-866c-36160b68b5cd"
moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
David Villasmil
<div>email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
<div>phone: +34669448337</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Thu, Jun 29, 2017 at 2:06 AM, David
Villasmil <span dir="ltr"><<a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Hello guys,</div>
<div><br>
</div>
<div>So i've setup kamailio 5 with wss. Registration goes
ok, but when trying to call, SIPML as well as jsSIP send
garbage as Contact header, something like:</div>
<div><br>
</div>
<div>Contact: <<a class="moz-txt-link-freetext" href="sip:0ku6du26@7j65fcf53i2k">sip:0ku6du26@7j65fcf53i2k</a>.<wbr>invalid;transport=ws>;reg-id=<wbr>1;+sip.instance="<urn:uuid:<wbr>8b49ac42-2039-4122-9f5b-<wbr>6f4e9f471f52>";expires=600<br>
</div>
<div><br>
</div>
<div>so when it passes through:</div>
<div><br>
</div>
<div>
<div><span style="white-space:pre-wrap"> </span>if
(is_method("REGISTER")) {</div>
<div><span style="white-space:pre-wrap"> </span>fix_nated_register();</div>
<div><span style="white-space:pre-wrap"> </span>} else
{</div>
<div><span style="white-space:pre-wrap"> </span>if
(!add_contact_alias()) {</div>
<div><span style="white-space:pre-wrap"> </span>xlog("L_ERR",
"Error aliasing contact <$ct>\n");</div>
<div><span style="white-space:pre-wrap"> </span>sl_send_reply("400",
"Bad Request");</div>
<div><span style="white-space:pre-wrap"> </span>exit;</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
<div><span style="white-space:pre-wrap"> </span>}</div>
</div>
<div><br>
</div>
<div>(taken from several examples i've found around)</div>
<div><br>
</div>
<div>add_contact_alias() fails because it tries to find
whether the ip address in the contact header is
different from the received ip, and if not, it adds the
received ip as a parameter... so the call doesn't
work...</div>
<div><br>
</div>
<div>I assume there's a way around this, can anyone help?</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div class="m_7450275809358822503gmail_signature">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
David Villasmil
<div>email: <a
href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
<div>phone: <a href="tel:+34%20669%2044%2083%2037"
value="+34669448337" target="_blank"
moz-do-not-send="true">+34669448337</a></div>
</div>
</div>
</div>
</div>
<div hspace="streak-pt-mark" style="max-height:1px"><img
alt="" style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&type=zerocontent&guid=11007804-68e7-4f7e-9deb-66f304c7f365"
moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>