--- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -373,14 +373,10 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now) gateway_ptr->failures = 0; - if (gateway_ptr->freq >= 60) { + if (gateway_ptr->freq > 30) { gateway_ptr->expires = now + (gateway_ptr->freq - 15); } else { - if (gateway_ptr->freq < 30 && gateway_ptr->freq >= 5) { - gateway_ptr->expires = now + (gateway_ptr->freq - 5); - } else { - gateway_ptr->expires = now + (gateway_ptr->freq); - } + gateway_ptr->expires = now + (gateway_ptr->freq / 2); } gateway_ptr->state = REG_STATE_REGED;