<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hi,</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">If your "almost the default one" config is like <a href="https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg">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-top:0;margin-bottom:0;margin-left:0;margin-right:0;"># - remove preloaded route headers</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">remove_hf("Route");</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">loose_route() is only done in WITHINDLG, which checks for has_totag()</p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">You should look at</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><a href="https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded">https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded</a> </p>
<br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Regards,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Kristian.</p>
<br><br><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On torsdag den 18. marts 2021 21.38.41 CET Easy Rider wrote:</p>
<p> </p>
<p style="margin-top:12;margin-bottom:0;margin-left:40;margin-right:40;">Hi</p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;">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:0;margin-bottom:0;margin-left:40;margin-right:40;">I've also tried with outbound module loaded, no change</p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;">I've also tried with WITH_NAT defined or not, no change</p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;">Cheers</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:40;margin-right:40;">Le jeu. 18 mars 2021 à 14:32, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> a écrit :</p>
<p> </p>
<p style="margin-top:12;margin-bottom:12;margin-left:46;margin-right:40;">Hello, </p>
<p style="margin-top:12;margin-bottom:12;margin-left:46;margin-right:40;">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 style="margin-top:12;margin-bottom:12;margin-left:46;margin-right:40;">Cheers,<br>Daniel</p>
<p> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:46;margin-right:40;">On 18.03.21 11:51, Easy Rider wrote:</p>
<p> </p>
<p style="margin-top:12;margin-bottom:0;margin-left:86;margin-right:80;">Hi </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">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:0;margin-bottom:0;margin-left:86;margin-right:80;">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:0;margin-bottom:0;margin-left:86;margin-right:80;">path is enabled on both EP and registrar, and use_received is set to 1 on EP</p>
<p> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">the path, contact and via headers in the REGISTER going from the EP to the registrar are : </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><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:0;margin-bottom:0;margin-left:86;margin-right:80;">Contact: <<a href="http://sip:1000@10.0.0.5:6060">sip:1000@10.0.0.5:6060</a>>;methods="INVITE, ACK, BYE, CANCEL, OPTIONS" </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">Path: <<a href="mailto:sip%3Ainside@192.168.26.129">sip:inside@192.168.26.129</a>;lr;received=sip:<a href="http://192.168.26.1:23456">192.168.26.1:23456</a>></p>
<p> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">where 192.168.26.129 is obviously the edge proxy </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">then I place a call to the UAC through registrar </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">the EP receiveds the following INVITE : </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">INVITE <a href="http://sip:1000@10.0.0.5:6060">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">sip:inside@192.168.26.129</a>;lr;received=sip:<a href="http://192.168.26.1:23456">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">sip:1001@my-fake-domain.com</a>>;tag=107-1<br>To: <<a href="mailto:sip%3A1000@my-fake-domain.com">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">1-107@192.168.26.1</a><br>Contact: <<a href="http://sip:1001@192.168.26.1:34567">sip:1001@192.168.26.1:34567</a>> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">...</p>
<p> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">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">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:0;margin-bottom:0;margin-left:86;margin-right:80;">The path module documentation states : </p>
<p style="margin-top:28;margin-bottom:21;margin-left:86;margin-right:80;"><span style="color:#6b5344;"><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:#000000;"><span style="font-size:-0.083em;"> </span></span></span></p>
<p style="margin-top:12;margin-bottom:12;margin-left:86;margin-right:80;">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:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">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:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">tried with kamailio 5.3.7 and 5.4.4 </p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><br></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">thanks </p>
<p> </p>
<p style="margin-top:12;margin-bottom:0;margin-left:86;margin-right:80;"><span style="font-family:Hack;">_______________________________________________</span></p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;">Kamailio (SER) - Users Mailing List</p>
<p style="margin-top:0;margin-bottom:0;margin-left:86;margin-right:80;"><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></p>
<p style="margin-top:0;margin-bottom:12;margin-left:86;margin-right:80;"><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a> </p>
<p style="margin-top:12;margin-bottom:0;margin-left:46;margin-right:40;">-- </p>
<p style="margin-top:0;margin-bottom:0;margin-left:46;margin-right:40;">Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a></p>
<p style="margin-top:0;margin-bottom:0;margin-left:46;margin-right:40;"><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></p>
<p style="margin-top:0;margin-bottom:12;margin-left:46;margin-right:40;">Funding: <a href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><br></p>
</body>
</html>