What is in $du if you log it right after handle_ruri_alias()? Maybe you overwrite it somewhere later?
Regards, Igor On Sep 1, 2018, 7:34 PM +0200, Wilkins, Steve swwilkins@mitre.org, wrote:
Thank you Joel,
My issue is that, given the Incoming Request: [[BYE sip:2406506175@20.20.20.20:5060;alias=10.10.10.5~55157~2 SIP/2.0. I want to route the BYE to the alias 10.10.10.5:55157. I have tried the combination you spoke of and it always still get routed to 20.20.20.20.5060.
I have even tried storing the original Via from the INVITE and using that in the BYE, however, I get a variable to maintain it’s state.
Thanks again, -Steve
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Joel Serrano Sent: Saturday, September 1, 2018 10:43 AM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] handle_ruri_alias() question or issue?
I think you are mixing 2 different approaches of achieving the same:
1- Use: fix_nated_contact() --> Will *modify* the contact header and *replace* current ip:port with correct ip:port.
2- Use: set_contact_alias() in conjunction with handle_ruri_alias() --> set_contact_alias will *add an alias* with correct ip:port but will not *modify* the current ip:port sent by the UAC. handle_ruri_alias will search for an alias in the RURI and if found, it will remove it and *set $du accordingly*.You will not see the contact with correct ip:port in RURI but routing will be sent to correct ip:port ($du).
This is a high level explanation, but I hope it helps you understand what is going on. If you print $du in the logs after calling handle_ruri_alias() you should see what you expect (if you previously called set_contact_alias)... Or you can call set_contact_alias on not call handle_ruri_alias. Two ways of doing the same.
On Sat, Sep 1, 2018 at 04:47 Wilkins, Steve swwilkins@mitre.org wrote:
Good Morning All,
The following Incoming request came in => SIP Incoming Request: [[BYE sip:2406506175@20.20.20.20:5060;alias=10.10.10.5~55157~2 SIP/2.0
I called handle_ruri_alias(), and expected the destination and port to be set to 10.10.10.5:55157, but it was not. It was left 20.20.20.20:5060.
Is my thinking correct or is there another way to set the destination and port to the alias?
Thanks All!, -Steve _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users