diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 2a51238..899efe5 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -706,7 +706,7 @@ route[INTERNAL_TO_EXTERNAL_RELAY] t_on_reply("EXTERNAL_REPLY"); - t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_timer)); + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_initial_timer)); t_relay(); } @@ -723,7 +723,7 @@ route[EXTERNAL_TO_INTERNAL_RELAY] t_on_reply("INTERNAL_REPLY"); t_on_failure("INTERNAL_FAULT"); - t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_timer)); + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_initial_timer)); #!ifdef WITH_INTERNAL_LISTENER xlog("L_DEBUG", "$ci|route|routing to internal thru PORT_PROTO_INTERNAL_LISTENER\n"); @@ -737,6 +737,12 @@ onreply_route[EXTERNAL_REPLY] { xlog("L_INFO", "$ci|log|external reply $T_reply_code $T_reply_reason\n"); + if($rs == 100) { + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_100_timer)); + } else if(status=~"[1][8][0-9]") { + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_18X_timer)); + } + #!ifdef NAT_TRAVERSAL_ROLE if(status=~"[12][0-9][0-9]") { route(NAT_MANAGE); @@ -763,6 +769,16 @@ onreply_route[INTERNAL_REPLY] xlog("L_DEBUG", "$ci|log|source $si:$sp\n"); } + if($rs == 100) { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_100_timer)); + } else if(status=~"[1][8][0-9]") { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_18X_timer)); + } + + if($rs == 100) { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_100_timer)); + } + #!ifdef NAT_TRAVERSAL_ROLE if(status=~"[12][0-9][0-9]") { route(NAT_MANAGE); diff --git a/kamailio/defs.cfg b/kamailio/defs.cfg index 1e321d9..8f2f6ca 100644 --- a/kamailio/defs.cfg +++ b/kamailio/defs.cfg @@ -7,11 +7,21 @@ #!substdef "!MAJOR!$(version(num){re.subst,/^(([^\.])*\.([^\.])*)\..*/\1/})!g" -#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_TIMER 2500 -#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_TIMER 3500 +#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_INITIAL_TIMER 2000 +#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_INITIAL_TIMER 2500 -kazoo.to_internal_no_response_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_TIMER descr "external to internal no response timer" -kazoo.to_external_no_response_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_TIMER descr "internal to external no response timer" +#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_100_TIMER 4500 +#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_100_TIMER 4500 + +#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER 45000 +#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_18X_TIMER 45000 + +kazoo.to_internal_no_response_initial_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_INITIAL_TIMER descr "external to internal initial no response timer" +kazoo.to_external_no_response_initial_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_INITIAL_TIMER descr "internal to external initial no response timer" +kazoo.to_internal_no_response_100_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_100_TIMER descr "external to internal no response timer after 100" +kazoo.to_external_no_response_100_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_100_TIMER descr "internal to external no response timer after 100" +kazoo.to_internal_no_response_18X_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER descr "external to internal no response timer after 18X" +kazoo.to_external_no_response_18X_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_18X_TIMER descr "internal to external no response timer after 18X" #!ifndef MY_HOSTNAME #!substdef "!MY_HOSTNAME!$HN(f)!g"