<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>try to run with debug=3 in kamailio.cfg and watch the logs, you
may get some hints about what happens, maybe there is some error
in processing or overwriting of destination address.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 18.03.21 11:51, Easy Rider wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACpwqg6nabAx2iNdifSjOn6jDo5dDdHo0JERqGEYGH-rmre7sw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi
<div><br>
</div>
<div>I'd like to make sure I've understood correctly how
use_received in path module is supposed to work, because I
don't get what I expected to get after reading the
documentation</div>
<div>I've got a little set up with a UAC behind a NAT
registering to a kamailio registrar through a kamailio edge
proxy (he UAC is a simple sipp script simulating a UAC behind
a NAT)<br>
</div>
<div>path is enabled on both EP and registrar, and use_received
is set to 1 on EP<br>
</div>
<div><br>
</div>
<div>the path, contact and via headers in the REGISTER going
from the EP to the registrar are :</div>
<div><br>
</div>
Via: SIP/2.0/UDP
192.168.26.129;branch=z9hG4bK20da.9f4ab6ad25eae6acdd4bd4d655b320ce.0<br>
Via: SIP/2.0/UDP
10.0.0.5:6060;received=192.168.26.1;rport=23456;branch=z9hG4bK-105-1-1<br>
<div>
Contact: <<a href="http://sip:1000@10.0.0.5:6060"
moz-do-not-send="true">sip:1000@10.0.0.5:6060</a>>;methods="INVITE,
ACK, BYE, CANCEL, OPTIONS" </div>
<div>Path: <<a href="mailto:sip%3Ainside@192.168.26.129"
moz-do-not-send="true">sip:inside@192.168.26.129</a>;lr;received=sip:<a
href="http://192.168.26.1:23456" moz-do-not-send="true">192.168.26.1:23456</a>><br>
</div>
<div><br>
</div>
<div>where 192.168.26.129 is obviously the edge proxy</div>
<div><br>
</div>
<div>then I place a call to the UAC through registrar</div>
<div>the EP receiveds the following INVITE :</div>
<div><br>
</div>
<div>INVITE <a href="http://sip:1000@10.0.0.5:6060"
moz-do-not-send="true">sip:1000@10.0.0.5:6060</a> SIP/2.0<br>
Record-Route: <a class="moz-txt-link-rfc2396E" href="sip:192.168.26.142;lr"><sip:192.168.26.142;lr></a><br>
Via: SIP/2.0/UDP
192.168.26.142;branch=z9hG4bKdf25.142eebc72e940d07ad983a858c67f64e.0<br>
Route: <<a href="mailto:sip%3Ainside@192.168.26.129"
moz-do-not-send="true">sip:inside@192.168.26.129</a>;lr;received=sip:<a
href="http://192.168.26.1:23456" moz-do-not-send="true">192.168.26.1:23456</a>><br>
Via: SIP/2.0/UDP
192.168.26.1:34567;received=192.168.26.1;rport=34567;branch=z9hG4bK-107-1-1<br>
From: "1001" <<a
href="mailto:sip%3A1001@my-fake-domain.com"
moz-do-not-send="true">sip:1001@my-fake-domain.com</a>>;tag=107-1<br>
To: <<a href="mailto:sip%3A1000@my-fake-domain.com"
moz-do-not-send="true">sip:1000@my-fake-domain.com</a>;user=phone><br>
CSeq: 1 INVITE<br>
Call-ID: <a href="mailto:1-107@192.168.26.1"
moz-do-not-send="true">1-107@192.168.26.1</a><br>
Contact: <<a href="http://sip:1001@192.168.26.1:34567"
moz-do-not-send="true">sip:1001@192.168.26.1:34567</a>></div>
<div>...<br>
</div>
<div><br>
</div>
<div>The Route header is exactly what is expected, but the edge
proxy still sends the request to the request-URI address (<a
href="http://10.0.0.5:6060" moz-do-not-send="true">10.0.0.5:6060</a>)
instead of sending the request to the received address set in
the first Route header</div>
<div>The path module documentation states :</div>
<div>
<div class="gmail-titlepage"
style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:15px">
<div>
<div>
<h3 class="gmail-title" style="margin:1em 0px
0.75em;padding:0px 0px 5px
5px;color:rgb(107,83,68);font-family:Scada,Helvetica,sans-serif;font-size:20px;line-height:28px;font-style:italic">3.1. <code
class="gmail-varname">use_received</code> (int)</h3>
</div>
</div>
</div>
<p
style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px">If
set to 1, the <span class="gmail-quote">“<span
class="gmail-quote">received</span>”</span> parameter of
the first Route <acronym class="gmail-acronym">URI</acronym> is
evaluated and used as destination-<acronym
class="gmail-acronym">URI</acronym> if present.</p>
</div>
<div><br>
</div>
<div>kamailio configuration on the EP is almost the default one
(just added path support, and modified the REGISTRAR route to
forward the request instead on saving the contact, so there is
not even a mid registrar on the EP</div>
<div><br>
</div>
<div>tried with kamailio 5.3.7 and 5.4.4</div>
<div><br>
</div>
<div>thanks</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>