[SR-Users] No dispatcher failover

Gertjan Wolzak g.wolzak at kazlow.nl
Wed Sep 26 14:15:22 CEST 2018


Hello Kamailions, 

I want to send traffic to an Asterisk box but when that box fails traffic should be routed to the second Asterisk box. 

The dispatcher params are as follows: 

# ----- Dispatcher params ------ 

modparam("dispatcher", "ds_probing_mode", 1) 
modparam("dispatcher", "ds_ping_interval", 20) 
modparam("dispatcher", "ds_ping_reply_codes", "class=2;class=3;class=4") 
modparam("dispatcher", "ds_inactive_threshold", 4) 
modparam("dispatcher", "ds_ping_latency_stats", 1) 
modparam("dispatcher", "ds_probing_threshold", 1) 

My dispatcher.list is: 

#DBBS PBX 

# SBC's 

1 sip:ip_address_sbc:5060 0 0 weight=100 

#PBX 

2 sip:ip_pbx_01:5060 0 10 weight=100 
2 sip:ip_pbx_02:5060 0 5 weight=100 

Verry simple request route: 

request_route { 

if (is_method("OPTIONS")) { 
sl_send_reply("200", "OK"); 
exit; 
} 

#Call from SBC to PBX 
#Get gateway from dispatcher list 

if($si=="ip_address_sbc1" |$si=="ip_address_sbc2" ) 
{ 
ds_select_dst("2", "8"); 
$var(new_uri) = "sip:" + $tU + "@" + $dd + ":5060"; 
$ru=($var(new_uri)); 
route(RELAY); 
exit; 
} 


# Call from pbx to SBC 
# Get sbc ip from dispatcher list 
ds_select_dst("1","4"); 
$var(new_uri) = "sip:" + $tU + "@" + $dd + ":5060"; 
$ru=($var(new_uri)); 
route(RELAY); 
} 

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. 

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... 

Or am I thinking to easy and do I need to configure some actions in the failure route? 

Pretty sure I'm doing something wrong, but cant see where and have not been able to find the information. 

Tips are appreciated. 

Rgds, 
Gertjan Wolzak 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180926/12062954/attachment.html>


More information about the sr-users mailing list