From 52fb53cba41cada08cb2e8ee15f4de7a44943535 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Fri, 27 Jun 2014 22:14:14 +0000 Subject: [PATCH] Allow reincarnation from mod_sofia's shutdown-on-fail mod_sofia's parameter shutdown-on-fail now accepts the value "reincarnate-now". This will cause the switch to exit immediately with a non-zero exit code so that the supervisor can recover the switch. For this to work you have to pass in -reincarnate or -reincarnate-reexec to freeswitch. --- src/mod/endpoints/mod_sofia/sofia.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b2019041ed..f53149f3fd 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2478,6 +2478,9 @@ static void sofia_perform_profile_start_failure(sofia_profile_t *profile, char * } else if (!strcasecmp(profile->shutdown_type, "asap")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile %s could not load! Shutting down ASAP!\n", profile->name); switch_core_session_ctl(SCSC_SHUTDOWN_ASAP, &arg); + } else if (!strcasecmp(profile->shutdown_type, "reincarnate-now")) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile %s could not load! Asking for reincarnation now!\n", profile->name); + switch_core_session_ctl(SCSC_REINCARNATE_NOW, &arg); } }