Browse Source

make progressive timers opt-in for now

master
lazedo 6 years ago
parent
commit
ffdc9e819d
2 changed files with 34 additions and 12 deletions
  1. +22
    -10
      kamailio/default.cfg
  2. +12
    -2
      kamailio/defs.cfg

+ 22
- 10
kamailio/default.cfg View File

@ -710,7 +710,11 @@ route[INTERNAL_TO_EXTERNAL_RELAY]
t_on_reply("EXTERNAL_REPLY"); 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(); t_relay();
} }
@ -727,7 +731,11 @@ route[EXTERNAL_TO_INTERNAL_RELAY]
t_on_reply("INTERNAL_REPLY"); t_on_reply("INTERNAL_REPLY");
t_on_failure("INTERNAL_FAULT"); 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 #!ifdef WITH_INTERNAL_LISTENER
xlog("L_DEBUG", "$ci|route|routing to internal thru PORT_PROTO_INTERNAL_LISTENER\n"); 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"); xlog("L_INFO", "$ci|log|external reply $T_reply_code $T_reply_reason\n");
if($rs == 100) { 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]") { } 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 #!ifdef NAT_TRAVERSAL_ROLE
@ -774,13 +786,13 @@ onreply_route[INTERNAL_REPLY]
} }
if($rs == 100) { 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]") { } 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 #!ifdef NAT_TRAVERSAL_ROLE


+ 12
- 2
kamailio/defs.cfg View File

@ -7,8 +7,13 @@
#!substdef "!MAJOR!$(version(num){re.subst,/^(([^\.])*\.([^\.])*)\..*/\1/})!g" #!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 EXTERNAL_TO_INTERNAL_NO_RESPONSE_100_TIMER 4500
#!trydef INTERNAL_TO_EXTERNAL_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 EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER 45000
#!trydef INTERNAL_TO_EXTERNAL_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_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_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_internal_no_response_100_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_100_TIMER descr "external to internal no response timer after 100"


Loading…
Cancel
Save