专注于VoIP,Opensips,Kamailio等技术,QQ群:QQ群:293697898
原文:http://www.6fok.com/topics/21
dispatcher 相关配置:
modparam("dispatcher", "ds_ping_interval", 10) modparam("dispatcher", "ds_probing_threshold", 3) modparam("dispatcher", "ds_probing_mode", 0) modparam("dispatcher", "ds_ping_from", "sip:keeper@proxy.com")
路由配置:
route[DISPATCH] {
if(ds_is_from_list()) {
route(SIPOUT);
} else {
#!ifdef WITH_PATH
if(!add_path_received()) {
xlog("add_path_received failed\n");
}
#!endif
if(is_method("REGISTER")) {
$var(server_grp) = "1";
} else {
$var(server_grp) = "2";
}
if(!ds_select_dst($var(server_grp), "0")) {
send_reply("404", "Dispatcher: No Destionation");
exit;
}
route(RELAY);
}
exit;
}
failure_route[MANAGE_FAILURE] {
#route(NATMANAGE);
if (t_is_canceled()) {
exit;
}
# try next dst - if only transcation failure of for 500 local timeout
if(t_check_status("500") or
(t_branch_timeout() and !t_branch_replied())) {
ds_mark_dst("ip");
if(ds_next_dst()) {
route(RELAY);
exit;
}
}
}