From 86bbb55e40afada81819e2fbf547d49a7f6427c3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 25 Jan 2007 14:56:32 +0000 Subject: [PATCH] make reg freq 2 sec less than you actually say to avoid crossfire and make the minimum setting be 5 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4055 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index fc1d3eeb54..5cf356df4b 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -5109,7 +5109,12 @@ static switch_status_t config_sofia(int reload) oreg->expires_str = switch_core_strdup(oreg->pool, "300"); } - oreg->freq = atoi(oreg->expires_str); + if ((oreg->freq = atoi(oreg->expires_str)) < 5) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Freq: %d. Setting Register-Frequency to 5\n", oreg->freq); + oreg->freq = 5; + } + oreg->freq -= 2; + oreg->next = profile->registrations; profile->registrations = oreg;