Hi,

If your "almost the default one" config is like 
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg[1], i guess 
it's the removal of route header at line 437/538.
# - remove preloaded route headers
remove_hf("Route");

loose_route() is only done in WITHINDLG, which checks for has_totag()

You should look at
https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded[2]
 

Regards,
Kristian.


On torsdag den 18. marts 2021 21.38.41 CET Easy Rider wrote:


Hi


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
I've also tried with outbound module loaded, no change
I've also tried with WITH_NAT defined or not, no change


Cheers


Le jeu. 18 mars 2021 à 14:32, Daniel-Constantin Mierla <[email protected][3]> a 
écrit :


Hello, 
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. 
Cheers,
Daniel


On 18.03.21 11:51, Easy Rider wrote:


Hi 


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 
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)


path is enabled on both EP and registrar, and use_received is set to 1 on EP




the path, contact and via headers in the REGISTER going from the EP to the 
registrar are : 

Via: SIP/2.0/UDP 
192.168.26.129;branch=z9hG4bK20da.9f4ab6ad25eae6acdd4bd4d655b320ce.0
Via: SIP/2.0/UDP 
10.0.0.5:6060;received=192.168.26.1;rport=23456;branch=z9hG4bK-105-1-1
Contact: <sip:[email protected]:6060[4]>;methods="INVITE, ACK, BYE, CANCEL, 
OPTIONS"  
Path: <sip:[email protected][5];lr;received=sip:192.168.26.1:23456[6]>




where 192.168.26.129 is obviously the edge proxy 


then I place a call to the UAC through registrar 
the EP receiveds the following INVITE : 


INVITE sip:[email protected]:6060[4] SIP/2.0
Record-Route: <sip:192.168.26.142;lr>
Via: SIP/2.0/UDP 
192.168.26.142;branch=z9hG4bKdf25.142eebc72e940d07ad983a858c67f64e.0
Route: <sip:[email protected][5];lr;received=sip:192.168.26.1:23456[6]>
Via: SIP/2.0/UDP 
192.168.26.1:34567;received=192.168.26.1;rport=34567;branch=z9hG4bK-107-1-1
From: "1001" <sip:[email protected][7]>;tag=107-1
To: <sip:[email protected][8];user=phone>
CSeq: 1 INVITE
Call-ID: [email protected][9]
Contact: <sip:[email protected]:34567[10]> 
...




The Route header is exactly what is expected, but the edge proxy still sends 
the request to the request-URI address (10.0.0.5:6060[11]) instead of sending 
the request to the received address set in the first Route header 
The path module documentation states : 
*/3.1. use_received (int)/* 
If set to 1, the “received” parameter of the first Route URI is evaluated and 
used as destination-URI if present. 


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 


tried with kamailio 5.3.7 and 5.4.4 


thanks 


_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected][12]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users[13] 
-- 
Daniel-Constantin Mierla -- www.asipto.com[14]
www.twitter.com/miconda[15] -- www.linkedin.com/in/miconda[16]
Funding: https://www.paypal.me/dcmierla[17] 



--------
[1] https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
[2] 
https://kamailio.org/docs/modules/devel/modules/rr.html#rr.f.loose_route_preloaded
[3] mailto:[email protected]
[4] http://sip:[email protected]:6060
[5] mailto:sip%[email protected]
[6] http://192.168.26.1:23456
[7] mailto:sip%[email protected]
[8] mailto:sip%[email protected]
[9] mailto:[email protected]
[10] http://sip:[email protected]:34567
[11] http://10.0.0.5:6060
[12] mailto:[email protected]
[13] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[14] http://www.asipto.com
[15] http://www.twitter.com/miconda
[16] http://www.linkedin.com/in/miconda
[17] https://www.paypal.me/dcmierla
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to