[OpenSIPS-Users] Question about using load balancing (dispatcher) within failure_route

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Oct 20 09:46:45 CEST 2008


Hi Woody,

This is related to a bug I recently found in the dispatcher module - the 
ds_next_dst() function, even if it should set only the destination URI, 
it internally creates a branch - so, you will end up with 2 branches 
actually :
    1) first, with the original URI and the DST from dispatcher
    2) second, with the URI from script (rewrite) and no dst;

Regarding the failover support, you need, to set some params, like:
    dst_avp -  
http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id2529512
    grp_avp - 
http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id2533853
    cnt_avp - 
http://www.opensips.org/html/docs/modules/devel/dispatcher.html#id2509422

Regards,
Bogdan

Woody Dickson wrote:
> Hello,
>
> I have my dispatcher setup fine for my INVITE so Opensips can now 
> distribute calls to one of the two B2BUA.  What I would also like to 
> do is that when 486 is recevied, Opensips can branch another route 
> back to one of the two B2BUA which will play the voicemail.   I tried:
> ds_select_dst("1", "4");
> ds_next_dst();
> rewritehostport("192.168.1.101:5070 <http://192.168.1.101:5070>");
>
> only rewritehostport works, but I don't want to hard code the host and 
> port inside the config script.  If I use ds_next_dst(), I am getting 
> "WARNING:dispatcher:ds_next_dst: failover support disabled".  Does 
> anyone know how to resolve this problem?
>
> Here is my failure_route block:
>
> failure_route[1] {
>
>        if (t_was_cancelled()) {
>             exit;
>     };
>     if (t_check_status("486")) {
>            revert_uri();
>               prefix("b");
>               xlog("L_ERR","Stepped into the 486 ruri=<$ru>");
>              #ds_select_dst("1", "4");
>             ds_next_dst();
>         #rewritehostport("192.168.1.131:5070 
> <http://192.168.1.131:5070>");
>              append_branch();
>              route(1);
>         
>             exit;
>     };
>
>
> Thanks in advance for all your help.
>
> Regards,
> Woody
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list