[OpenSIPS-Users] dispatcher - not getting out of Pending mode

Matt Hamilton mistral9999 at hotmail.com
Fri Nov 25 04:12:24 CET 2011



I'm testing dispatcher with failover (tesitng both probing_modes: automatic with 1, and 0 with failure_route). Opensips is dispatching calls to 2 Asterisk servers. If I stop one of the Asterisk servers, that node becomes Pending as expected, but when I restart the node, it doesn't turn Active again.

Here is my test: 


1. I start Opensips with both Asterisk nodes Active (Asterisk is running on both servers)
ds_list ( opensipsctl fifo ds_list) shows both nodes Active

2. I stop Asterisk in Server B
ds_list shows 2nd node as "P" pretty much right away for mode 1, and after the 1st failed request comes for mode 2
So far, everything is OK

3. I start Asterisk in server B
ds_list still shows Server B as Pending (both for mode 1 and 2); however, it never goes back to Active unless I restart Opensips


If I start Opensips when one of the nodes Pending (Asterisk off), and later start Asterisk on that node, ds_list still doesn't report it Active.


The log (debug=4) shows both nodes sending the <OPTION> reply, but for some reason ds_list doesn't reflect that, and ds_select_dst ignores the new "active" node.


Any suggestions? I'm pretty sure I'm missing something very simple.


Below is my code. 

Thanks,
Matt




###############################################################################################

# gateways
1 sip:10.0.1.128:5060
1 sip:10.0.1.129:5060



###############################################################################################

modparam("dispatcher", "list_file","/usr/local/etc/opensips/dispatcher.list")
modparam("dispatcher", "flags", 2)   
modparam("dispatcher", "dst_avp", "$avp(271)")
modparam("dispatcher", "grp_avp", "$avp(272)")
modparam("dispatcher", "cnt_avp", "$avp(273)")
modparam("dispatcher", "hash_pvar", "$si")   
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_interval", 1)   
modparam("dispatcher", "ds_probing_mode", 0)     
modparam("dispatcher", "ds_probing_threshhold", 1) 

modparam("tm", "fr_timer", 3)



route{
    if (!ds_is_in_list("$si", "$sp")) {      /* if it's not asterisk replying back to opensips  */
        t_on_failure("1");
        ds_select_dst("1", "7");   
        }
    route(1);
}

route[1] {
    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}


failure_route[1]{
        if (t_was_cancelled()) {
                exit;
        }
        if (t_check_status("408")) {
                ds_mark_dst("p");
                
        t_on_failure("1");        
        ds_next_dst();
        route(1);
        }
}


###############################################################################################

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111124/f86cd9f9/attachment-0001.htm>


More information about the Users mailing list