[r10376]: branches / 1.8 / test / 13.cfg Maximize Restore History

Download this file

13.cfg    63 lines (59 with data), 1.5 kB

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
mpath="../modules"
loadmodule "sl/sl.so"
loadmodule "tm/tm.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(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;
}
cr_user_carrier("$fU", "$fd", "$avp(carrier)");
$avp(domain)="start";
if (!cr_route("$avp(carrier)", "$avp(domain)", "$rU", "$rU", "call_id", "$avp(host)")) {
xlog("L_ERR", "cr_route failed\n");
exit;
}
t_on_failure("1");
if (!t_relay()) {
sl_reply_error();
};
}
failure_route[1] {
revert_uri();
if (!cr_next_domain("$avp(carrier)", "$avp(domain)", "$rU", "$avp(host)", "$T_reply_code", "$avp(domain)")) {
xlog("L_ERR", "cr_next_domain failed\n");
exit;
}
if (!cr_route("$avp(carrier)", "$avp(domain)", "$rU", "$rU", "call_id", "$avp(host)")) {
xlog("L_ERR", "cr_route failed\n");
exit;
}
t_on_failure("1");
if (!t_relay()) {
xlog("L_ERR", "t_relay failed\n");
exit;
};
}