<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>can you make the full ngrep trace for the call (from initial
invite sent by kamailio, with all following sip messages) and send
it over here?<br>
</p>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 27/04/16 17:16, huseyin kalyoncu
wrote:<br>
</div>
<blockquote
cite="mid:CAPf+86VLTOrJ2RJW5=bkB0jynf6kgtSo35e4akX_475UamBPvw@mail.gmail.com"
type="cite">
<div dir="ltr">Hello Daniel
<div><br>
</div>
<div>I did some more tests and my previous statement is wrong.</div>
<div>Actually it do call set_contact_alias on 200 reply for
INVITEs </div>
<div>but somehow it has no change. </div>
<div>I really missing something here.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 27, 2016 at 3:35 PM,
huseyin kalyoncu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:hkalyoncu@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:hkalyoncu@gmail.com">hkalyoncu@gmail.com</a></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">Hello Daniel
<div><br>
</div>
<div>You are right. 200OK messages are also with private
IPs.</div>
<div>I think the problem is that </div>
<div>since I call dlg_bridge with Kamailio's own IP </div>
<div>It sends INVITE messages to itself first then it
routes INVITE msg to user location.</div>
<div>Because of this i see two record routes in the INTIVE
headers and 200 reply headers.</div>
<div><br>
</div>
<div> if (is_reply()) {</div>
<div> if(isbflagset(FLB_NATB)) {</div>
<div> if(is_first_hop())</div>
<div> set_contact_alias();</div>
<div> }</div>
<div> }</div>
<div><br>
</div>
<div>But according to this code in NATMANAGE block, it
only set contact if it is first hope.</div>
<div>Since these messages have two record routes, this
code block does not modify contact field</div>
<div>Am I right? or Am I missing something else?</div>
<div><br>
</div>
<div>Thanks</div>
<span class="HOEnZb"><font color="#888888">
<div>Huseyin</div>
<div> </div>
</font></span></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 27, 2016 at 12:50
PM, Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>dlg_bridge is not using the location table at
all, because it has to use the contact from
200ok of INVITE.</p>
<p>Have you used set_contact_alias() for natted
200ok received for INVITE?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>
<div> <br>
<div>On 27/04/16 11:15, huseyin kalyoncu
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Daniel
<div><br>
</div>
<div>This is the sample output from our
location table;</div>
<div><br>
</div>
<div>
<div>kamailio=# select
username,contact,received,user_agent
from location where
username='5678*0012';</div>
<div> username | contact
| received
| user_agent </div>
<div>-----------+---------------------------------+-----------------------+---------------------</div>
<div> 5678*0012 | <a
moz-do-not-send="true"><a class="moz-txt-link-freetext" href="sip:5678*">sip:5678*</a></a><a
moz-do-not-send="true"
href="http://0012@192.168.1.21:5090"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:0012@192.168.1.21:5090">0012@192.168.1.21:5090</a></a>
| <a moz-do-not-send="true">sip:DEVICE_PUBLIC_ADDRESS:5090</a>
| Cisco/SPA504G-7.6.1</div>
<div>(1 row)</div>
<div><br>
</div>
<div><br>
</div>
<div>After calling dlg_bridge Kamailio
firing INVITE and rings the device.</div>
<div>After answering on this device
Kamailio firing REFER message.</div>
<div>But as you can see from ngrep
output below, Kamailio is trying to
send this message to address in the
contact field which is a private
IP. </div>
<div><br>
</div>
<div>U 2016/04/27 10:58:25.745935
KAMAILIO_PUBLIC_ADDRESS:5090 -> <a
moz-do-not-send="true"
href="http://192.168.1.21:5090"
target="_blank">192.168.1.21:5090</a></div>
<div>REFER <a moz-do-not-send="true">sip:5678*</a><a
moz-do-not-send="true"
href="http://0012@192.168.1.21:5090"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:0012@192.168.1.21:5090">0012@192.168.1.21:5090</a></a>
SIP/2.0.</div>
<div>Via: SIP/2.0/UDP
KAMAILIO_PUBLIC_ADDRESS:5090;branch=z9hG4bK0ab8.1c5e622e4af6b7b6c9ede7ade4a50bf8.0.</div>
<div>Via: SIP/2.0/UDP
KAMAILIO_PUBLIC_ADDRESS;rport=5060;branch=z9hG4bK0ab8.c8a54413000000000000000000000000.0.</div>
<div>To: <a moz-do-not-send="true"><sip:5678*0012@KAMAILIO_PUBLIC_ADDRESS></a>;tag=199aaa02310a0799i1.</div>
<div>From:
<a moz-do-not-send="true"><sip:click2call@KAMAILIO_PUBLIC_ADDRESS></a>;tag=0d71401ca91009b00be5953e2813d7e4-7471.</div>
<div>CSeq: 11 REFER.</div>
<div>Call-ID:
63dc8c8a5ea88a30-868@KAMAILIO_PUBLIC_ADDRESS.</div>
<div>Max-Forwards: 69.</div>
<div>Content-Length: 0.</div>
<div>User-Agent: Kamailio.</div>
<div>Referred-By: <a
moz-do-not-send="true"><a class="moz-txt-link-freetext" href="sip:click2call@KAMAILIO_PUBLIC_ADDRESS">sip:click2call@KAMAILIO_PUBLIC_ADDRESS</a></a>.</div>
<div>Refer-To: <a
moz-do-not-send="true"><a class="moz-txt-link-freetext" href="sip:5678*0002@KAMAILIO_PUBLIC_ADDRESS">sip:5678*0002@KAMAILIO_PUBLIC_ADDRESS</a></a>.</div>
<div>Contact: <a
moz-do-not-send="true"><a class="moz-txt-link-rfc2396E" href="sip:click2call@KAMAILIO_PUBLIC_ADDRESS:5060"><sip:click2call@KAMAILIO_PUBLIC_ADDRESS:5060></a></a>.</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 27,
2016 at 10:47 AM, Daniel-Constantin
Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF"
text="#000000">
<p>Hello,</p>
<p>can you send the ngrep trace
for such case? I would like to
look at the headers to
understand properly what do you
mean.</p>
<p>Cheers,</p>
<p>Daniel<br>
</p>
<div>
<div> <br>
<div>On 26/04/16 15:23,
huseyin kalyoncu wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Hello
<div><br>
</div>
<div>I am trying to
implement click 2 call
functionality on
Kamailio
with dlg_bridge.</div>
<div>But It seems that
Kamailio routes REFER
messages to devices
according to Contact
field of location table
instead of Received
field. </div>
<div>But if the the IP in
the Contact field is
private REFER messages
are failing so </div>
<div>does the dlg_bridge.</div>
<div><br>
</div>
<div><br>
</div>
<div>I called dlg_bridge
in the config like this:</div>
<div><br>
</div>
<div>dlg_bridge(<a
moz-do-not-send="true"><a class="moz-txt-link-rfc2396E" href="sip:$param1">"sip:$param1"</a></a>,
<a
moz-do-not-send="true"><a class="moz-txt-link-rfc2396E" href="sip:$param2">"sip:$param2"</a></a>,
<a
moz-do-not-send="true"><a class="moz-txt-link-rfc2396E" href="sip:IP_ADDRESS_OF_KAMAILIO:5060">"sip:IP_ADDRESS_OF_KAMAILIO:5060"</a></a>);<br>
</div>
<div><br>
</div>
<div>It rings the device
in $param1 but after
answering on that device</div>
<div>Kamailio fails to
send REFER if the
Contact field for that
device is Private IP.</div>
<div>So it fails to
initiate a call.</div>
<div><br>
</div>
<div>How can I force
Kamailio to use Received
field for REFER messages
instead of Contact
field?<br>
</div>
<div><br>
</div>
<div>Thanks</div>
<div>Huseyin</div>
<div><br>
</div>
<div> </div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, Berlin, May 18-20, 2016 - <a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
</font></span></div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and
Kamailio (OpenSER) - sr-users
mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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>
</pre>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, Berlin, May 18-20, 2016 - <a moz-do-not-send="true" href="http://www.kamailioworld.com" target="_blank">http://www.kamailioworld.com</a></pre>
</div>
</div>
</div>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) -
sr-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.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-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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 World Conference, Berlin, May 18-20, 2016 - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
</body>
</html>