Browse Source

tweak what is considered a retry requiring failure

3.17
karl anderson 12 years ago
parent
commit
854016e224
1 changed files with 15 additions and 24 deletions
  1. +15
    -24
      kamailio/default.cfg

+ 15
- 24
kamailio/default.cfg View File

@ -107,7 +107,8 @@ disable_sctp = yes
####### Modules Section ######## ####### Modules Section ########
mpath="/usr/lib64/kamailio/modules/"
# mpath="/usr/lib64/kamailio/modules/"
mpath="/opt/kamailio/lib64/kamailio/modules"
######## Kamailio core extensions module ######## ######## Kamailio core extensions module ########
loadmodule "kex.so" loadmodule "kex.so"
@ -474,7 +475,7 @@ onreply_route[INTERNAL_REPLY]
xlog("L_INFO", "$ci|start|recieved internal reply $T_reply_code $rr"); xlog("L_INFO", "$ci|start|recieved internal reply $T_reply_code $rr");
xlog("L_INFO", "$ci|log|source $si:$sp"); xlog("L_INFO", "$ci|log|source $si:$sp");
if (t_check_status("180|183")) {
if (t_check_status("(180)|(183)")) {
xlog("L_INFO", "$ci|log|session progress, only listening for redirects"); xlog("L_INFO", "$ci|log|session progress, only listening for redirects");
setflag(FLAG_SESSION_PROGRESS); setflag(FLAG_SESSION_PROGRESS);
} }
@ -483,12 +484,7 @@ onreply_route[INTERNAL_REPLY]
xlog("L_INFO", "$ci|pass|$T_req($si):$T_req($sp)"); xlog("L_INFO", "$ci|pass|$T_req($si):$T_req($sp)");
} }
# change 6xx to 4xx
if (t_check_status("6[0-9][0-9]")) {
$var(new_code) = "4" + $(T_reply_code{s.substr,1,0});
change_reply_status("$var(new_code)", "$rr");
}
$var(reply_reason) = $rr;
} }
@ -522,22 +518,20 @@ failure_route[INTERNAL_FAULT]
} }
} }
if (isflagset(FLAG_SESSION_PROGRESS)) {
# change 6xx to 4xx
if (t_check_status("6[0-9][0-9]")) {
$var(new_code) = "4" + $(T_reply_code{s.substr,1,0});
xlog("L_INFO", "$ci|log|sending 6XX reply as $var(new_code) $var(reply_reason)");
t_reply("$(var(new_code){s.int})", "$var(reply_reason)");
} else if ("$var(reply_reason)" =~ "call barred") {
xlog("L_INFO", "$ci|log|failure route ignoring call barred");
} else if (isflagset(FLAG_SESSION_PROGRESS)) {
xlog("L_INFO", "$ci|log|failure route ignoring failure after session progress"); xlog("L_INFO", "$ci|log|failure route ignoring failure after session progress");
exit;
} else if (t_check_status("(401)|(407)|(486)")) {
xlog("L_INFO", "$ci|log|failure route ignoring auth reply $T_reply_code $rr");
exit;
} else if (t_check_status("(401)|(407)|(486)|(403)")) {
xlog("L_INFO", "$ci|log|failure route ignoring auth reply $T_reply_code $var(reply_reason)");
} else if (t_check_status("402")) { } else if (t_check_status("402")) {
xlog("L_INFO", "$ci|log|failure route overriding reply code 402 with 486"); xlog("L_INFO", "$ci|log|failure route overriding reply code 402 with 486");
xlog("L_INFO", "$ci|pass|$si:$sp");
send_reply("486", "Insufficient Funds"); send_reply("486", "Insufficient Funds");
exit;
} else if (t_check_status("(4[0-9][0-9])|(5[0-9][0-9])")) { } else if (t_check_status("(4[0-9][0-9])|(5[0-9][0-9])")) {
xlog("L_INFO", "$ci|start|received failure reply $T_reply_code $rr"); xlog("L_INFO", "$ci|start|received failure reply $T_reply_code $rr");
@ -546,13 +540,10 @@ failure_route[INTERNAL_FAULT]
#!endif #!endif
send_reply("486", "Unable to Comply"); send_reply("486", "Unable to Comply");
exit;
} else { } else {
xlog("L_INFO", "$ci|log|failure route ignoring reply $T_reply_code $rr"); xlog("L_INFO", "$ci|log|failure route ignoring reply $T_reply_code $rr");
exit;
} }
xlog("L_INFO", "$ci|pass|$si:$sp");
} }
onsend_route { onsend_route {


Loading…
Cancel
Save