[OpenSER-Users] Dispatcher Failover Hell.

whudson05 whudson05 at gmail.com
Tue Apr 22 13:39:30 CEST 2008


Try the following:


route[10] {
    xlog("L_INFO","Inbound Routing");
    t_on_failure("11");
    ds_select_dst("1","4");
    xlog("L_INFO","---> $avp(i:271) $avp(i:272) $avp(i:273)");
    xlog("L_INFO","Trying first route $dd $od $rd $td $br");
    t_relay();
}

failure_route[11] {
    xlog("L_INFO","First route failed. Trying second");
    if(t_check_status("408") ){
         if (ds_next_dst()){ 
             t_on_failure("11");
             t_relay();
        }
    }
    else {
        xlog("L_INFO","Run out of servers in dispatcher.list");
    }
}

I think it's only showing you the first element of $avp(i:271) which is the
selected destination.


Douglas Garstang-3 wrote:
> 
> I'm using OpenSER 1.2.2. I can't get the dispatcher to do failover.
> 
> Here's my module parameters...
> 
> modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")
> modparam("dispatcher", "flags", 2)
> modparam("dispatcher", "dst_avp", "$avp(i:271)")
> modparam("dispatcher", "grp_avp", "$avp(i:272)")
> modparam("dispatcher", "cnt_avp", "$avp(i:273)")
> modparam("dispatcher", "force_dst", 1)
> modparam("tm","fr_timer",3)
> 
> Here's my dispatcher list file:
> 1 sip:119.42.149.76:5099
> 1 sip:119.42.149.79:5099
> 
> And, my routing logic is below. 
> 
> The first thing that I don't understand is that when I print $avp(i:271) I
> get "sip:119.42.149.76:5099". Where did the other IP address form the list
> file go? When I print $avp(i:273), I get "2" which is supposed to be the
> count of the number of items in the list. Where's the other IP gone? I
> only see one.
> 
> The failover routing doesn't work. When OpenSER fails to connect to the
> first IP, it goes into failure_route(11) like it is supposed to, but it
> DOES NOT try the other IP address (the one that is missing from
> $avp(i:271)). I have confirmed this by running ngrep on port 5060.
> 
> So... question is... why is the dispatcher only loading one entry from the
> dispatcher list file into the avp?
> 
> Doug.
> 
> 
> route[10] {
>     xlog("L_INFO","Inbound Routing");
>     t_on_failure("11");
>     ds_select_dst("1","4");
>     xlog("L_INFO","---> $avp(i:271) $avp(i:272) $avp(i:273)");
>     forward();
>     xlog("L_INFO","Trying first route $dd $od $rd $td $br");
>     t_relay();
> }
> 
> failure_route[11] {
>     xlog("L_INFO","First route failed. Trying second");
>     if(t_check_status("408") ){
>         ds_next_dst(); 
>         t_on_failure("12");
>         t_relay();
>     }
>     else {
>         t_reply("501", "Not Implemented");
>     }
> }
> 
> failure_route[12] {
>     route(13);
> }
> 
> route[13] {
>     xlog("L_INFO","CRAP");
>     return;
> }
> 
> 
> 
> 
> 
> 
> 
>      
> ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now. 
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/Dispatcher-Failover-Hell.-tp16757753p16823810.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.





More information about the sr-users mailing list