$du: sip:20.20.20.20;transport=tcp;lr;r2=on;ftag=as761c30aa;nat=yes
$ru: sip:125.10.1.14;lr;r2=on
handle_ruri_alias(); has no effect
$mb =>
[BYE sip:2135601240@10.10.10.10:5060;alias=125.10.1.14~38869~2 SIP/2.0#015#012
Via: SIP/2.0/TCP 30.30.30.30:5060;rport;branch=z9hG4bKPjd336f9fd-d890-4017-8f38-c668fb067823;alias#015#012
From: <sip:7032935282@125.10.1.14>;tag=a09b41bb-f621-47e1-9753-3efc6e00268e#015#012
To: "Mitre6 Testing" <sip:2135601240@125.10.1.14>;tag=as761c30aa#015#012
Call-ID: 00ef3468081a927b7512d9445badc0f8@125.10.1.14#015#012
CSeq: 30144 BYE#015#012Route: <sip:10.10.10.10:5060;lr;r2=on;ftag=as761c30aa;nat=yes>#015#012
Route: <sip:20.20.20.20;transport=tcp;lr;r2=on;ftag=as761c30aa;nat=yes>#015#012
Route: <sip:125.10.1.14;transport=tcp;lr;r2=on>#015#012
Route: <sip:125.10.1.14;lr;r2=on>#015#012Reason: Q.850;cause=16#015#012
Max-Forwards: 69#015#012
User-Agent: Asterisk PBX 15.3.0#015#012Content-Length: 0
Kamailio Public IP: 20.20.20.20
Kamailio Private IP 10.10.10.10
Asterisk Private IP:30.30.30.30
IP of Called Server: 125.10.1.14
Called Number: 2135601240
I want the relay to go to the alias: 125.10.1.14:38869
Thank you!
From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Joel Serrano
Sent: Saturday, September 1, 2018 9:41 PM_______________________________________________
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] handle_ruri_alias() question or issue?
Can you print $ru and $du of that BYE in the logs and send them here?
On Sat, Sep 1, 2018 at 14:41 Wilkins, Steve <swwilkins@mitre.org> wrote:
Right before t_relay, $mb =>
[BYE sip:3128145656@10.10.10.10:5060;alias=125.10.1.15~32940~2 SIP/2.0#015#012Via: SIP/2.0/TCP 172.21.1.124:5060;rport;branch=z9hG4bKPj88f9c57d-5db6-4731-83c9-df478782fa39;alias#015#012From: <sip:7032935282@125.10.1.15>;tag=aed37e42-1af3-4944-9132-74ec323ceda3#015#012To: "Mitre6 Testing" <sip:3128145656@125.10.1.15>;tag=as09387c4a#015#012Call-ID: 6f6147b437dfae9c7b5731d1679189ed@125.10.1.15#015#012CSeq: 27644 BYE#015#012Route: <sip:10.10.10.10:5060;lr;r2=on;ftag=as09387c4a;nat=yes>#015#012Route: <sip:20.20.20.20;transport=tcp;lr;r2=on;ftag=as09387c4a;nat=yes>#015#012Route: <sip:125.10.1.15;transport=tcp;lr;r2=on>#015#012Route: <sip:125.10.1.15;lr;r2=on>#015#012Reason: Q.850;cause=16#015#012Max-Forwards: 69#015#012User-Agent: Asterisk PBX 15.3.0#015#012Content-Length: 0
I want the BYE to be sent to the alias 125.10.1.15:32940
Nothing I do seems to let me get that alias and send the BYE to that address:port
Thank you,
-Steve
From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Igor Olhovskiy
Sent: Saturday, September 1, 2018 2:05 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] handle_ruri_alias() question or issue?
What is in $du if you log it right after handle_ruri_alias()?
Maybe you overwrite it somewhere later?
Regards, IgorOn 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:3128145656@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:3128145656@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_______________________________________________
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