You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/test/unit/14.cfg

32 lines
722 B

loadpath "../../modules/:../../modules_k/"
loadmodule "sl"
loadmodule "xlog"
loadmodule "maxfwd"
loadmodule "carrierroute"
loadmodule "pv"
loadmodule "mi_fifo"
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
route{
# initial sanity checks
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return;
};
if (method == "REGISTER") {
if(!cr_route("default", "register", "$rU", "$rU", "call_id", "$avp(s:30)")) {
sl_send_reply("403", "Not allowed");
}
sl_send_reply("200", "OK");
return;
}
if (method == "INVITE") {
if(!cr_route("default", "proxy", "$rU", "$rU", "call_id")) {
sl_send_reply("403", "Not allowed");
}
sl_send_reply("100", "Trying");
return;
}
}