<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br>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.<br><br>Here is my test: <br><br><br>1. I start Opensips with both Asterisk nodes Active (Asterisk is running on both servers)<br>ds_list ( opensipsctl fifo ds_list) shows both nodes Active<br><br>2. I stop Asterisk in Server B<br>ds_list shows 2nd node as "P" pretty much right away for mode 1, and after the 1st failed request comes for mode 2<br>So far, everything is OK<br><br>3. I start Asterisk in server B<br>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<br><br><br>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.<br><br><br>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.<br><br><br>Any suggestions? I'm pretty sure I'm missing something very simple.<br><br><br>Below is my code. <br><br>Thanks,<br>Matt<br><br><br><br><br>###############################################################################################<br><br># gateways<br>1 sip:10.0.1.128:5060<br>1 sip:10.0.1.129:5060<br><br><br><br>###############################################################################################<br><br>modparam("dispatcher", "list_file","/usr/local/etc/opensips/dispatcher.list")<br>modparam("dispatcher", "flags", 2) <br>modparam("dispatcher", "dst_avp", "$avp(271)")<br>modparam("dispatcher", "grp_avp", "$avp(272)")<br>modparam("dispatcher", "cnt_avp", "$avp(273)")<br>modparam("dispatcher", "hash_pvar", "$si") <br>modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>modparam("dispatcher", "ds_ping_interval", 1) <br>modparam("dispatcher", "ds_probing_mode", 0) <br>modparam("dispatcher", "ds_probing_threshhold", 1) <br><br>modparam("tm", "fr_timer", 3)<br><br><br><br>route{<br> if (!ds_is_in_list("$si", "$sp")) { /* if it's not asterisk replying back to opensips */<br> t_on_failure("1");<br> ds_select_dst("1", "7"); <br> }<br> route(1);<br>}<br><br>route[1] {<br> if (!t_relay()) {<br> sl_reply_error();<br> };<br> exit;<br>}<br><br><br>failure_route[1]{<br> if (t_was_cancelled()) {<br> exit;<br> }<br> if (t_check_status("408")) {<br> ds_mark_dst("p");<br> <br> t_on_failure("1"); <br> ds_next_dst();<br> route(1);<br> }<br>}<br><br><br>###############################################################################################<br><br>                                            </div></body>
</html>