mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
add 908-retry-seconds gateway param to set reg retry time when getting a 908 for backup interfaces to connect quickly
This commit is contained in:
@@ -3320,6 +3320,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
|
||||
*context = profile->context,
|
||||
*expire_seconds = "3600",
|
||||
*retry_seconds = "30",
|
||||
*fail_908_retry_seconds = NULL,
|
||||
*timeout_seconds = "60",
|
||||
*from_user = "", *from_domain = NULL, *outbound_proxy = NULL, *register_proxy = NULL, *contact_host = NULL,
|
||||
*contact_params = "", *params = NULL, *register_transport = NULL,
|
||||
@@ -3434,6 +3435,8 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
|
||||
context = val;
|
||||
} else if (!strcmp(var, "expire-seconds")) {
|
||||
expire_seconds = val;
|
||||
} else if (!strcmp(var, "908-retry-seconds")) {
|
||||
fail_908_retry_seconds = val;
|
||||
} else if (!strcmp(var, "retry-seconds")) {
|
||||
retry_seconds = val;
|
||||
} else if (!strcmp(var, "timeout-seconds")) {
|
||||
@@ -3547,6 +3550,10 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
|
||||
|
||||
gateway->retry_seconds = atoi(retry_seconds);
|
||||
|
||||
if (fail_908_retry_seconds) {
|
||||
gateway->fail_908_retry_seconds = atoi(fail_908_retry_seconds);
|
||||
}
|
||||
|
||||
if (gateway->retry_seconds < 5) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid retry-seconds of %d on gateway %s, using the value of 30 instead.\n",
|
||||
gateway->retry_seconds, name);
|
||||
|
||||
Reference in New Issue
Block a user