uint32_t port_alloc_flags;
char *event_channel_key_separator;
uint32_t max_audio_channels;
+ switch_call_cause_t shutdown_cause;
};
extern struct switch_runtime runtime;
memset(&runtime, 0, sizeof(runtime));
gethostname(runtime.hostname, sizeof(runtime.hostname));
+ runtime.shutdown_cause = SWITCH_CAUSE_SYSTEM_SHUTDOWN;
runtime.max_db_handles = 50;
runtime.db_handle_timeout = 5000000;
runtime.event_heartbeat_interval = 20;
case SCSC_MDNS_RESOLVE:
switch_core_media_set_resolveice(!!oldintval);
break;
+ case SCSC_SHUTDOWN_CAUSE:
+ runtime.shutdown_cause = oldintval;
+ break;
}
if (intval) {
switch_set_flag((&runtime), SCF_SHUTTING_DOWN);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "End existing sessions\n");
- switch_core_session_hupall(SWITCH_CAUSE_SYSTEM_SHUTDOWN);
+ switch_core_session_hupall(runtime.shutdown_cause);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Clean up modules.\n");
switch_loadable_module_shutdown();