forked from OpenSIPS/opensips
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path14.cfg
More file actions
35 lines (32 loc) · 819 Bytes
/
Copy path14.cfg
File metadata and controls
35 lines (32 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
mpath="../modules"
loadmodule "sl/sl.so"
loadmodule "xlog/xlog.so"
loadmodule "maxfwd/maxfwd.so"
loadmodule "carrierroute/carrierroute.so"
loadmodule "mi_fifo/mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
route{
# initial sanity checks
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
return;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message too big");
return;
};
if (method == "REGISTER") {
if(!cr_route("default", "register", "$rU", "$rU", "call_id", "$avp(extra)")) {
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;
}
}