[SR-Users] received parameter in route URI not used despite path use_received set to 1

Easy Rider easyrider.8791 at gmail.com
Fri Mar 19 22:24:34 CET 2021


Hi

Good call, thanks a lot, this was exactly the source of my problem

Cheers

Le ven. 19 mars 2021 à 07:54, Kristian Høgh <kfh at uni-tel.dk> a écrit :

> Hi,
>
> If your "almost the default one" config is like
> https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg, 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
>
>
> 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 <miconda at gmail.com>
> 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:1000 at 10.0.0.5:6060>;methods="INVITE, ACK, BYE, CANCEL,
> OPTIONS"
>
> Path: <sip:inside at 192.168.26.129;lr;received=sip:192.168.26.1:23456>
>
>
>
>
> 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:1000 at 10.0.0.5:6060 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:inside at 192.168.26.129;lr;received=sip:192.168.26.1:23456>
> 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:1001 at my-fake-domain.com>;tag=107-1
> To: <sip:1000 at my-fake-domain.com;user=phone>
> CSeq: 1 INVITE
> Call-ID: 1-107 at 192.168.26.1
> Contact: <sip:1001 at 192.168.26.1:34567>
>
> ...
>
>
>
>
> 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) 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
>
> sr-users at lists.kamailio.org
>
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
>
> Daniel-Constantin Mierla -- www.asipto.com
>
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>
> Funding: https://www.paypal.me/dcmierla
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210319/246d923e/attachment.htm>


More information about the sr-users mailing list