diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 0039932..abaff4b 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -710,7 +710,11 @@ route[INTERNAL_TO_EXTERNAL_RELAY] t_on_reply("EXTERNAL_REPLY"); - t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_initial_timer)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_initial_timer)); + } else { + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_timer)); + } t_relay(); } @@ -727,7 +731,11 @@ 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_initial_timer)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_initial_timer)); + } else { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_timer)); + } #!ifdef WITH_INTERNAL_LISTENER xlog("L_DEBUG", "$ci|route|routing to internal thru PORT_PROTO_INTERNAL_LISTENER\n"); @@ -742,9 +750,13 @@ 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)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + 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)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + t_set_fr(0, $sel(cfg_get.kazoo.to_external_no_response_18X_timer)); + } } #!ifdef NAT_TRAVERSAL_ROLE @@ -774,13 +786,13 @@ onreply_route[INTERNAL_REPLY] } if($rs == 100) { - t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_100_timer)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + 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)); + if($sel(cfg_get.kazoo.use_progressive_timers) == 1) { + t_set_fr(0, $sel(cfg_get.kazoo.to_internal_no_response_18X_timer)); + } } #!ifdef NAT_TRAVERSAL_ROLE diff --git a/kamailio/defs.cfg b/kamailio/defs.cfg index 8f2f6ca..8d0fa65 100644 --- a/kamailio/defs.cfg +++ b/kamailio/defs.cfg @@ -7,8 +7,13 @@ #!substdef "!MAJOR!$(version(num){re.subst,/^(([^\.])*\.([^\.])*)\..*/\1/})!g" -#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_INITIAL_TIMER 2000 -#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_INITIAL_TIMER 2500 +#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_TIMER 3500 +#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_TIMER 3500 + +#!trydef USE_PROGRESSIVE_TIMERS 0 + +#!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_INITIAL_TIMER 1500 +#!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_INITIAL_TIMER 1500 #!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_100_TIMER 4500 #!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_100_TIMER 4500 @@ -16,6 +21,11 @@ #!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER 45000 #!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_18X_TIMER 45000 +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" + +kazoo.use_progressive_timers = USE_PROGRESSIVE_TIMERS descr "use progressive timers" + 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"