mirror of https://github.com/sipwise/kamailio.git
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.
76 lines
1.3 KiB
76 lines
1.3 KiB
# ----------- global configuration parameters ------------------------
|
|
debug=2
|
|
fork=yes
|
|
log_stderror=no
|
|
children=1
|
|
disable_tcp=yes
|
|
|
|
# ------------------ module loading ----------------------------------
|
|
loadpath "../../modules/:../../modules_k/"
|
|
loadmodule "tm"
|
|
loadmodule "sl"
|
|
loadmodule "rr"
|
|
loadmodule "maxfwd"
|
|
loadmodule "textops"
|
|
loadmodule "xlog"
|
|
loadmodule "pv"
|
|
loadmodule "mi_fifo"
|
|
modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
|
|
|
|
loadmodule "usrloc"
|
|
modparam("usrloc", "db_mode", 1)
|
|
|
|
loadmodule "registrar"
|
|
modparam("registrar", "min_expires", 5)
|
|
modparam("usrloc", "timer_interval", 2)
|
|
|
|
#------------------------- request routing logic -------------------
|
|
route{
|
|
|
|
if (!mf_process_maxfwd_header("10")) {
|
|
sl_send_reply("483","Too Many Hops");
|
|
exit;
|
|
}
|
|
|
|
if (msg:len >= 2048 ) {
|
|
sl_send_reply("513", "Message Too Large");
|
|
exit;
|
|
}
|
|
|
|
if (!method=="REGISTER")
|
|
record_route();
|
|
|
|
if (loose_route()) {
|
|
# mark routing logic in request
|
|
append_hf("P-hint: rr-enforced\r\n");
|
|
route(1);
|
|
}
|
|
|
|
if (!uri==myself) {
|
|
append_hf("P-hint: outbound\r\n");
|
|
route(1);
|
|
}
|
|
|
|
if (uri==myself) {
|
|
if (method=="REGISTER") {
|
|
save("location");
|
|
exit;
|
|
}
|
|
if (!lookup("location")) {
|
|
sl_send_reply("404", "Not Found");
|
|
exit;
|
|
}
|
|
append_hf("P-hint: usrloc applied\r\n");
|
|
}
|
|
|
|
route(1);
|
|
}
|
|
|
|
route[1] {
|
|
if (!t_relay()) {
|
|
sl_reply_error();
|
|
}
|
|
exit;
|
|
}
|
|
|