<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hello Kamailions,</div><div><br data-mce-bogus="1"></div><div>I want to send traffic to an Asterisk box but when that box fails traffic should be routed to the second Asterisk box.</div><div><br data-mce-bogus="1"></div><div>The dispatcher params are as follows:</div><div><br data-mce-bogus="1"></div><div><div># ----- Dispatcher params ------</div><div><br></div><div>modparam("dispatcher", "ds_probing_mode", 1)</div><div>modparam("dispatcher", "ds_ping_interval", 20)</div><div>modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;class=4")</div><div>modparam("dispatcher", "ds_inactive_threshold", 4)</div><div>modparam("dispatcher", "ds_ping_latency_stats", 1)</div><div>modparam("dispatcher", "ds_probing_threshold", 1)</div><div><br data-mce-bogus="1"></div><div>My dispatcher.list is:</div><div><br data-mce-bogus="1"></div><div><div>#DBBS PBX</div><div><br data-mce-bogus="1"></div><div><div># SBC's</div><div><br></div><div>1 sip:ip_address_sbc:5060 0 0 weight=100</div><div><br data-mce-bogus="1"></div><div>#PBX</div></div><div><br></div><div>2 sip:ip_pbx_01:5060 0 10 weight=100</div><div>2 sip:ip_pbx_02:5060 0 5   weight=100</div><div><br data-mce-bogus="1"></div><div>Verry simple request route:</div><div><br data-mce-bogus="1"></div><div><div>request_route {</div><div><br></div><div>                if (is_method("OPTIONS")) {</div><div>                       <span style="white-space:pre">     </span>sl_send_reply("200", "OK");</div><div>                       <span style="white-space:pre">    </span>exit;</div><div>                }</div><div><br></div><div>                #Call from SBC to PBX</div><div>                #Get gateway from dispatcher list</div><div><br></div><div>                if($si=="ip_address_sbc1" |$si=="ip_address_sbc2" )</div><div>                {</div><div>                        ds_select_dst("2", "8");</div><div>                        $var(new_uri) = "sip:" + $tU + "@" + $dd + ":5060";</div><div>                       <span style="white-space:pre">       </span>$ru=($var(new_uri));</div><div>                        route(RELAY);</div><div>                       <span style="white-space:pre">       </span>exit;</div><div>               }</div><div><br></div><div><br></div><div>               <span style="white-space:pre"> </span># Call from pbx to SBC</div><div>                # Get sbc ip from dispatcher list</div><div>                ds_select_dst("1","4");</div><div>                $var(new_uri) = "sip:" + $tU + "@" + $dd + ":5060";</div><div>                $ru=($var(new_uri));</div><div>                route(RELAY);</div><div>}</div></div></div><div><br></div><div>When I send a call to the kamailio its routed correctly to the first pbx. But when I kill the asterisk process on the first pbx, an invite is still send by Kamailio to the first pbx.</div><div><br data-mce-bogus="1"></div><div>Maybe I am assuming incorrectly that when the dispatcher does not react to the ds_ping it will be set to "inactive" and not be selected by the ds_select_dst command...</div><div><br data-mce-bogus="1"></div><div>Or am I  thinking to easy and do I need to configure some actions in the failure route?</div><div><br data-mce-bogus="1"></div><div>Pretty sure I'm doing something wrong, but cant see where and have not been able to find the information.</div><div><br data-mce-bogus="1"></div><div>Tips are appreciated.</div><div><br data-mce-bogus="1"></div><div>Rgds,</div><div>Gertjan Wolzak</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div></div></body></html>