[SR-Users] Normal behaviour with loose_routing

Daniel Tryba d.tryba at pocos.nl
Tue Jan 30 10:51:41 CET 2018


On Tue, Jan 30, 2018 at 10:22:39AM +0100, Loic Chabert wrote:
> 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.

Having a similar setup:
-all messages not from the ipadresses of "Proxy Router/registrar"
machines are DISPATCHed
-everything else is loose_route()-ed
 
> 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 ?

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



More information about the sr-users mailing list