<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello,</p>
<p>got distracted by other tasks and upcoming kamailio world stuff
...</p>
<p>So you got it working now, right?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 28/04/16 19:22, huseyin kalyoncu
wrote:<br>
</div>
<blockquote
cite="mid:CAPf+86Wzg1FRaxQQGquWAVcFy0KGD=mPQesKBjn9-Oozs6_DRg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello Daniel
<div><br>
</div>
<div>After all Kamailio was not calling set_contact_alias</div>
<div>on reply received from itself. So in reply_route block
calling following code</div>
<div>resolved the issue.</div>
<div><br>
</div>
<div>
<div> if (src_ip == "KAMAILIO_IP_ADDRESS" &&
status == "200") {</div>
<div> if ($fU == "click2call") {</div>
<div> set_contact_alias();</div>
<div> }</div>
<div> }</div>
</div>
<div><br>
</div>
<div>Thank you for your helps and your understanding.</div>
<div><br>
</div>
<div>Best wishes</div>
<div><br>
</div>
<div>Huseyin</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 28, 2016 at 7:20 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>I forgot to mention when I sent the capture file.</div>
<div>There is only single Kamailio instance running but It
listens multiple ports.</div>
<div>5090 for outside traffic and 5060 for inside traffic
(other Kamailio servers, FS servers, etc.) </div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 27, 2016 at 7:49
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>Attachment is the full ngrep output for the
sample call.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 27,
2016 at 6:51 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>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
<div>
<div><br>
<br>
<div>On 27/04/16 17:16, huseyin
kalyoncu wrote:<br>
</div>
<blockquote 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><font
color="#888888">
<div>Huseyin</div>
<div> </div>
</font></span></div>
<div>
<div>
<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="mailto: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"><a class="moz-txt-link-freetext" href="sip:DEVICE_PUBLIC_ADDRESS:5090">sip:DEVICE_PUBLIC_ADDRESS:5090</a></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"><a class="moz-txt-link-freetext" href="sip:5678*">sip:5678*</a></a><a moz-do-not-send="true"
href="mailto:0012@192.168.1.21:5090"
target="_blank">0012@192.168.1.21:5090</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"><a class="moz-txt-link-rfc2396E" href="sip:5678*0012@KAMAILIO_PUBLIC_ADDRESS"><sip:5678*0012@KAMAILIO_PUBLIC_ADDRESS></a></a>;tag=199aaa02310a0799i1.</div>
<div>From: <a
moz-do-not-send="true"><a class="moz-txt-link-rfc2396E" href="sip:click2call@KAMAILIO_PUBLIC_ADDRESS"><sip:click2call@KAMAILIO_PUBLIC_ADDRESS></a></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">"sip:$param2"</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"><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></a><br>
<a
moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer"
target="_blank"><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></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"><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a></a><br>
<a
moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer"
target="_blank"><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></a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</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>
</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>