preloader
blog-post

kamailio dispatcher的重定向分发

author image

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”)

路由配置:

dispatch request

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;
    }
}

Recent Articles

blog-post

限时免费实时质检、免费座席助手中间件

 注意,本次应用的能力为半实时,即不是每个语音包流都要送往识别,而是VAD后才送,识别后通过ESL发送消息后进行处理,用于座席辅助或半实时质检均可。部署方式为:云主机、物理机、测试型的内部虚拟机均可。识别特性:座席助手,或当检测到有异常,实 …