<div dir="ltr">Hi<div><br></div><div>Good call, thanks a lot, this was exactly the source of my problem</div><div><br></div><div>Cheers</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 19 mars 2021 à 07:54, Kristian Høgh <<a href="mailto:kfh@uni-tel.dk">kfh@uni-tel.dk</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<div><p style="margin:0px">Hi,</p>
<br><p style="margin:0px">If your "almost the default one" config is like <a href="https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg" target="_blank">https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg</a>, i guess it's the removal of route header at line 437/538.</p>
<p style="margin:0px"># - remove preloaded route headers</p>
<p style="margin:0px">remove_hf("Route");</p>
<br><p style="margin:0px">loose_route() is only done in WITHINDLG, which checks for has_totag()</p>
<br><p style="margin:0px">You should look at</p>
<p style="margin:0px"><a href="https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded" target="_blank">https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded</a> </p>
<br><p style="margin:0px">Regards,</p>
<p style="margin:0px">Kristian.</p>
<br><br><p style="margin:0px">On torsdag den 18. marts 2021 21.38.41 CET Easy Rider wrote:</p>
<p> </p>
<p style="margin-bottom:0px">Hi</p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">I've run the test again with log level set to 4, and I don't see anything related to route header parsing, I don't see any trace of the received uri value</p>
<p style="margin-top:0px;margin-bottom:0px">I've also tried with outbound module loaded, no change</p>
<p style="margin-top:0px;margin-bottom:0px">I've also tried with WITH_NAT defined or not, no change</p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">Cheers</p>
<p style="margin:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">Le jeu. 18 mars 2021 à 14:32, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> a écrit :</p>
<p> </p>
<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</p>
<p> </p>
<p style="margin-top:0px;margin-bottom:0px">On 18.03.21 11:51, Easy Rider wrote:</p>
<p> </p>
<p style="margin-bottom:0px">Hi </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">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 </p>
<p style="margin-top:0px;margin-bottom:0px">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)</p>
<p> </p>
<p style="margin-top:0px;margin-bottom:0px">path is enabled on both EP and registrar, and use_received is set to 1 on EP</p>
<p> </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">the path, contact and via headers in the REGISTER going from the EP to the registrar are : </p>
<p style="margin-top:0px;margin-bottom:0px"><br>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</p>
<p style="margin-top:0px;margin-bottom:0px">Contact: <<a href="http://sip:1000@10.0.0.5:6060" target="_blank">sip:1000@10.0.0.5:6060</a>>;methods="INVITE, ACK, BYE, CANCEL, OPTIONS"  </p>
<p style="margin-top:0px;margin-bottom:0px">Path: <<a href="mailto:sip%3Ainside@192.168.26.129" target="_blank">sip:inside@192.168.26.129</a>;lr;received=sip:<a href="http://192.168.26.1:23456" target="_blank">192.168.26.1:23456</a>></p>
<p> </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">where 192.168.26.129 is obviously the edge proxy </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">then I place a call to the UAC through registrar </p>
<p style="margin-top:0px;margin-bottom:0px">the EP receiveds the following INVITE : </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">INVITE <a href="http://sip:1000@10.0.0.5:6060" target="_blank">sip:1000@10.0.0.5:6060</a> SIP/2.0<br>Record-Route: <sip:192.168.26.142;lr><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" target="_blank">sip:inside@192.168.26.129</a>;lr;received=sip:<a href="http://192.168.26.1:23456" target="_blank">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" target="_blank">sip:1001@my-fake-domain.com</a>>;tag=107-1<br>To: <<a href="mailto:sip%3A1000@my-fake-domain.com" target="_blank">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" target="_blank">1-107@192.168.26.1</a><br>Contact: <<a href="http://sip:1001@192.168.26.1:34567" target="_blank">sip:1001@192.168.26.1:34567</a>> </p>
<p style="margin-top:0px;margin-bottom:0px">...</p>
<p> </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">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" target="_blank">10.0.0.5:6060</a>) instead of sending the request to the received address set in the first Route header </p>
<p style="margin-top:0px;margin-bottom:0px">The path module documentation states : </p>
<p><span style="color:rgb(107,83,68)"><strong><em><span style="font-family:Scada"><span style="font-size:1em">3.1. </span></span><span style="font-family:Hack">use_received</span><span style="font-family:Scada"> (int)</span></em></strong></span><span style="font-family:Helvetica"><span style="color:rgb(0,0,0)"><span> </span></span></span></p>
<p>If set to 1, the “received” parameter of the first Route URI is evaluated and used as destination-URI if present. </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">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 </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">tried with kamailio 5.3.7 and 5.4.4 </p>
<p style="margin-top:0px;margin-bottom:0px"><br></p>
<p style="margin-top:0px;margin-bottom:0px">thanks </p>
<p> </p>
<p style="margin-bottom:0px"><span style="font-family:Hack">_______________________________________________</span></p>
<p style="margin-top:0px;margin-bottom:0px">Kamailio (SER) - Users Mailing List</p>
<p style="margin-top:0px;margin-bottom:0px"><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a></p>
<p style="margin-top:0px"><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a> </p>
<p style="margin-bottom:0px">-- </p>
<p style="margin-top:0px;margin-bottom:0px">Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a></p>
<p style="margin-top:0px;margin-bottom:0px"><a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a></p>
<p style="margin-top:0px">Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a> </p>
<p style="margin:0px"><br></p>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>