Hi list,
I'm facing an routing issue with the following sip infrastructure:
ASTERISK 1 ---___ Kamailio proxy ____ Kamailio frontend ___ IPBX ASTERISK 2 ---/
And please find below desired call-flow:
1 - An asterisk 1 server send a call to a proxy 2 - This proxy make a location lookup, and send it to kamailio frontend proxy 3 - Frontend proxy relay to Wazo PBX (for example) 4 - Callee respond ... 5 - Callee hangup the call, so Wazo PBX send a BYE request to kamailio frontend proxy 6 - Based on Route headers, frontend forward BYE request to proxy 7 - ... here cames issues ...
Question is simple (but answer will be probably more complex): how can i sent in dialog BYE request to ASTERISK 1, and not asterisk 2.
Should i use dispatcher module ? Should i use specials headers to send back to Asterisk 1 the BYE request ? What is the normal behaviour for in-dialog requests ?
I can't find any answers on SIP RFCs or any archived messages on mailing list.
Thanks in advance, Best regards.
On Wed, Apr 04, 2018 at 11:57:55AM +0200, Loic Chabert wrote:
Question is simple (but answer will be probably more complex): how can i sent in dialog BYE request to ASTERISK 1, and not asterisk 2.
I'm confused, what does your config look like? The normal way to do this just to t_relay() these, see the route[WITHINDLG] in the default example config: https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
As far i read on Kamailio reposity, WITHINDLG use loose_route() function. But on BYE request, no Route headers (corresponding to asterisk 1) are available => BYE request can not be loose routed. Route headers has been remove by loadbalancer to avoid routing injections on my network (by an hacker for example).
Example of BYE request sent from IPBX throught Loadbalancer to Kamailio proxy:
BYE sip:10.0.246.76:5060 SIP/2.0 Record-Route: sip:10.0.246.189;r2=on;lr=on;ftag=as08627a3a;socket=udp: 91.129.172.36:5060 Record-Route: sip:91.129.172.36;r2=on;lr=on;ftag=as08627a3a;socket=udp: 91.129.172.36:5060 Via: SIP/2.0/UDP 10.0.246.189;branch=z9hG4bK0d3d.f756947e05f126ea9f04daf00218c6fa.0 Via: SIP/2.0/UDP 91.129.172.1:3198 ;received=91.129.172.1;branch=z9hG4bK6896d552;rport=3198 Max-Forwards: 69 From: sip:0450584004@example.net;tag=as08627a3a To: 0482680110 <sip:0481680110@example.net
;tag=0ee03819-900d-4d09-8188-de39ce74afcf
Call-ID: 25bf2883-640c-4139-aca6-6c3e1170ea60 CSeq: 102 BYE User-Agent: Wazo PBX X-Asterisk-HangupCause: Normal Clearing X-Asterisk-HangupCauseCode: 16
With: 10.0.246.76 -> Asterisk 1 91.129.172.36 -> Loadbalancer public IP 10.0.246.189 -> Loadbalancer public private
Only Request URI has Asterisk 1 IP address. If i set more debug on kamailio, message return by kamailio: No transaction match.
2018-04-04 16:36 GMT+02:00 Daniel Tryba d.tryba@pocos.nl:
On Wed, Apr 04, 2018 at 11:57:55AM +0200, Loic Chabert wrote:
Question is simple (but answer will be probably more complex): how can i sent in dialog BYE request to ASTERISK 1, and not asterisk 2.
I'm confused, what does your config look like? The normal way to do this just to t_relay() these, see the route[WITHINDLG] in the default example config: https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Wed, Apr 04, 2018 at 05:06:13PM +0200, Loic Chabert wrote:
As far i read on Kamailio reposity, WITHINDLG use loose_route() function. But on BYE request, no Route headers (corresponding to asterisk 1) are available => BYE request can not be loose routed. Route headers has been remove by loadbalancer to avoid routing injections on my network (by an hacker for example).
You could mangle the contact in the INVITE on the edges, force set_contact_alias() for all INVITEs from these asterisk machines and handle_ruri_alias() within dialog.