Hi list,
I have a setup configurered has diagram below:
UAC -> Proxy LB (proxy lb) -> Proxy Router/registrar (proxy B) -> Asterisk SBC
My UAC is SIPP and sending a classic call scenario: INVITE - ACK - BYE.
But i have some trouble to understand which queries should be loose routed and which queries should be dispatched by dispatcher module.
My first invite request has been dispatched to proxy B by proxy LB. After that, ACK and BYE request should be loose_routed or should be dispatched as other request ? My proxy B is a statefull proxy, logging cdrs and other stuff ...
From my point of view, subsequent request should be loose_routed to keep
dialog informations consistent. My subsequent requests have record-route headers. Should i use theses headers to route my calls ?
Loose routing features only work with "Route" header ? What is the difference beetwen Route headers and Record-route headers ?
Thanks in advance, Regards.
On Tue, Jan 30, 2018 at 10:22:39AM +0100, Loic Chabert wrote:
Having a similar setup: -all messages not from the ipadresses of "Proxy Router/registrar" machines are DISPATCHed -everything else is loose_route()-ed
Yes, all subsequent message cvan be handled within dialog. Your config could be something really close to the basic kamailio config (with WITH_NAT defined)
request_route { route(REQINIT);
route(NATDETECT); route(WITHINDLG);
if (is_method("INVITE|SUBSCRIBE")) { record_route(); }
if(!is_in_subnet($si, "x.y.z.a/bc")) { add_path_received();
ds_select_dst(1, 0);
t_on_failure("RTF_DISPATCH"); } else { remove_hf("Route");
loose_route(); }
route(RELAY); }
Loose routing features only work with "Route" header ? What is the difference beetwen Route headers and Record-route headers ?
I'll leave this answer to the experts :)
Thanks Daniel,
Your snippet code must be used in proxy/registrar or on LB ?
The proxy/registrar should follow the same behaviour with the SBC and the lb ? Loose_route every request from sbc and dispatch request from lb to sbc ?
Regards.
2018-01-30 10:51 GMT+01:00 Daniel Tryba d.tryba@pocos.nl:
On Tue, Jan 30, 2018 at 11:14:18AM +0100, Loic Chabert wrote:
Thanks Daniel,
Your snippet code must be used in proxy/registrar or on LB ?
It's for the loadbalancer. The registrar also is a near default supplied config, only added support for Path to be used for REGISTERs and dispatcher.
As far as I understand it is simply based on loose routing for all messages after dispatching INVITEs with ds_*.
BTW my SBCs don't initiate calls to the registrar/proxies but to the loadbalancers (SIP domain via DNS/SRV/NAPTR)
UACa -> LB -> REGISTRAR/Proxy -> LB -> UACb UACa -> LB -> REGISTRAR/Proxy -> SBC -> UACb
UACa -> SBC -> LB -> REGISTRAR/Proxy -> LB -> UACb UACa -> SBC -> LB -> REGISTRAR/Proxy -> SBC -> UACb
If i check my ACK messages sent from my LB to my proxy, to Route headers is present. So my ack has not been forwarded to my SBC. So i can't route all subsequent INVITE messages without using dispatcher for ACK messages.
ACK messages are in the same INVITE transaction ?
My SBC is asterisk, and does not insert Record-route headers. Is it a normal behaviour for an SBC ?
Regards.
2018-01-30 16:00 GMT+01:00 Daniel Tryba d.tryba@pocos.nl:
On Tue, Jan 30, 2018 at 06:25:57PM +0100, Loic Chabert wrote:
ACK messages are in the same INVITE transaction ?
No, e2e ACKs are a transaction in their own right.
However:
(a) They will have the same CSeq number as the INVITE to which they correspond;
(b) They are a bit "special" in that they gather no responses.
My SBC is asterisk, and does not insert Record-route headers. Is it a normal behaviour for an SBC ?
Only proxies add Record-Route headers. The job of the endpoints is to marshal them into Route headers in in-dialog requests.
-- Alex