Hi James,

Here are my listen directives:
listen=udp:192.168.1.2:5060
listen=tcp: 192.168.1.2:5060

knowing that:
Kamailio IP: 192.168.1.2
SBC IP: 192.168.1.1
Caller IP: 192.168.1.5

-----Original Message-----
From: Ali Taher via sr-users <sr-users@lists.kamailio.org> 
Sent: Thursday, November 2, 2023 1:42 PM
To: James Browne <ja...@frideo.com>; Kamailio (SER) - Users Mailing List 
<sr-users@lists.kamailio.org>
Cc: Ali Taher <ata...@vanrise.com>
Subject: [SR-Users] Re: SIP Proxy : BYE next hop

Hi James,

Yes I'm using loose_route() and it's returning 1, but BYE message is not routed 
anywhere.

Frame 6213: 673 bytes on wire (5384 bits), 673 bytes captured (5384 bits) 
Ethernet II, Src: Cisco_f8:19:ff (00:22:bd:f8:19:ff), Dst: VMware_bf:27:0b 
(00:50:56:bf:27:0b) Internet Protocol Version 4, Src: 192.168.1.5, Dst: 
192.168.1.2 User Datagram Protocol, Src Port: 16368, Dst Port: 5060 Session 
Initiation Protocol (BYE)
    Request-Line: BYE sip:192.168.1.1:5060;transport=udp SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 
192.168.1.5:16368;branch=z9hG4bK-d87543-c147891e677a1f19-1--d87543-;rport
        Max-Forwards: 70
        Route: <sip:192.168.1.2;lr;ftag=7d4a7c3c>
        Route: <sip:192.168.1.1:5060;ipcs-line=43354518;lr;transport=udp>
        Contact: <sip:131@192.168.1.5:16368>
        To: "121"<sip:121@192.168.1.1>;tag=gtyrzghr-CC-1047-OFC-39
        From: "69079514"<sip:69079514@192.168.1.2>;tag=7d4a7c3c
        Call-ID: 085d9048b81abc1eNDUwODVhMjI2NDk5NDM3YmZiZWZiYzI0YWZkOTU1Njc.
        [Generated Call-ID: 
085d9048b81abc1eNDUwODVhMjI2NDk5NDM3YmZiZWZiYzI0YWZkOTU1Njc.]
        CSeq: 2 BYE
        User-Agent: eyeBeam release 1003s stamp 31159
        Reason: SIP;description="User Hung Up"
        Content-Length: 0

Here is routing block related to BYE:
if (is_method("BYE")) {
xlog("L_INFO","INSIDE BYE");
$var(loose) = loose_route();
xlog("L_INFO","LOOSE : $var(loose)");
}


Regards,

-----Original Message-----
From: James Browne <ja...@frideo.com>
Sent: Thursday, November 2, 2023 12:31 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc: Ali Taher <ata...@vanrise.com>
Subject: Re: [SR-Users] SIP Proxy : BYE next hop

Hello
Did you call the loose_route() function for the BYE? It should just work; 
that's one of the basics of how kamailio works, so I'll be very surprised if 
there's somehow a bug in kamailio.
If that does not work, perhaps send a list of the listen directives in the 
kamailio.cfg, along with the headers of the two SIP BYE messages (incoming and 
outgoing) and I'll see what I can figure out for you.

James

On Thu, 2 Nov 2023 at 09:35, Ali Taher via sr-users 
<sr-users@lists.kamailio.org> wrote:
>
> Hello all,
>
>
>
> I’m using Kamailio as SIP proxy between session manager and SBC.
>
> I came across an issue in BYE request where the SBC sent in the header 
> list of Routes where first route is Kamailio IP, and the second is SM 
> IP, in addition to other routes (last route is the caller party)
>
> What Kamailio did is to route the BYE to the address set in the Request-URI, 
> which is the caller party.
>
> What should be done instead is that Kamailio should remove the Route header 
> including its own IP, and route the BYE to the next hop which is in this case 
> the SM IP.
>
>
>
> How to accomplish that?
>
>
>
> Following is the Route header in the BYE request coming from SBC:
>
> [truncated]Route: 
> <sip:KAMAILIO_IP;lr;ftag=xxxxxxxxxxxxxxxxxxxxxxx>,<sip:SM1@SM_IP;trans
> port=udp;lr;av-asset-uid=xxxxxxxxxx>,<sip:127.0.0.2:15060;transport=ud
> p;ibmsid=local.xxxxxxxxxxxx_xxxxxxxxx_xxxxxxxxx;lr;ibmdrr>,sips:127.0.
> 0.2:15061;ibmsid=local.xxxxxxxxxx_xxxxxxxxxx_xxxxxxxx;lr;ibmdrr,
> sip:SM1@SM_IP;transport=tls;lr;av-asset-uid=xxxxxx,
> sip:CALLER_PARTY_IP:5061;transport=tls;lr
>
>
>
> Regards,
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions To 
> unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to