|
|
|
@ -168,6 +168,7 @@ loadmodule "sdpops.so" |
|
|
|
######## Generic Hash Table container in shared memory ######## |
|
|
|
loadmodule "htable.so" |
|
|
|
modparam("htable", "htable", "associations=>size=16;autoexpire=7200") |
|
|
|
modparam("htable", "htable", "redirects=>size=16;autoexpire=5") |
|
|
|
modparam("htable", "db_url", "KAZOO_DB_URL") |
|
|
|
|
|
|
|
####### RTIMER module ########## |
|
|
|
@ -762,6 +763,13 @@ onreply_route[INTERNAL_REPLY] |
|
|
|
) { |
|
|
|
xlog("L_INFO", "$ci|log|call setup, now ignoring abnormal termination\n"); |
|
|
|
setflag(FLAG_SESSION_PROGRESS); |
|
|
|
|
|
|
|
# clear the redirect |
|
|
|
if ($avp(AVP_REDIRECT_KEY) != $null && $sht(redirects=>$avp(AVP_REDIRECT_KEY)) != $null) { |
|
|
|
xlog("L_INFO", "$ci|log|removing redirect mapping $avp(AVP_REDIRECT_KEY)\n"); |
|
|
|
$sht(redirects=>$avp(AVP_REDIRECT_KEY)) = $null; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if ($rs < 300) { |
|
|
|
@ -795,8 +803,14 @@ failure_route[INTERNAL_FAULT] |
|
|
|
|
|
|
|
remove_hf_re("^X-.*"); |
|
|
|
|
|
|
|
# handle challenges replies from media server, we want to route to same media server |
|
|
|
if (t_check_status("407")) { |
|
|
|
xlog("L_INFO", "$ci|log|media $xavp(ds_dst=>uri) challenged the invite, creating redirect\n"); |
|
|
|
$var(redirect) = @from.uri.user + "@" + @from.uri.host + "->" + @ruri.user + "@" + @ruri.host; |
|
|
|
$sht(redirects=>$var(redirect)) = $xavp(ds_dst=>uri); |
|
|
|
|
|
|
|
# change 6xx to 4xx |
|
|
|
if (t_check_status("6[0-9][0-9]") && !t_check_status("600|603|604|606")) { |
|
|
|
} else if (t_check_status("6[0-9][0-9]") && !t_check_status("600|603|604|606")) { |
|
|
|
$var(new_code) = "4" + $(T_reply_code{s.substr,1,0}); |
|
|
|
xlog("L_INFO", "$ci|failure|sending $T_reply_code reply as $var(new_code) $T_reply_reason\n"); |
|
|
|
t_reply("$(var(new_code){s.int})", "$T_reply_reason"); |
|
|
|
@ -809,7 +823,7 @@ failure_route[INTERNAL_FAULT] |
|
|
|
xlog("L_INFO", "$ci|failure|ignoring failure after session progress\n"); |
|
|
|
} else if (t_check_status("403") && $T_reply_reason=="Forbidden") { |
|
|
|
xlog("L_WARNING", "$ci|failure|Failed auth from IP $si\n"); |
|
|
|
} else if (t_check_status("(401)|(407)|(486)")) { |
|
|
|
} else if (t_check_status("(401)|(486)")) { |
|
|
|
xlog("L_INFO", "$ci|failure|auth reply $T_reply_code $T_reply_reason\n"); |
|
|
|
} else if (t_check_status("402")) { |
|
|
|
xlog("L_INFO", "$ci|failure|overriding reply code 402 with 486\n"); |
|
|
|
|