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, 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: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