This commit is contained in:
Anthony Minessale 2011-12-16 14:41:48 -06:00
parent 5ed0152dd1
commit 482d9db8b0
1 changed files with 13 additions and 5 deletions

View File

@ -4306,11 +4306,6 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
*new_session = NULL;
if (sofia_test_pflag(profile, PFLAG_STANDBY)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "System Paused\n");
goto error;
}
if (!outbound_profile || zstr(outbound_profile->destination_number)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid Empty Destination\n");
goto error;
@ -4412,6 +4407,13 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
}
profile = gateway_ptr->profile;
if (profile && sofia_test_pflag(profile, PFLAG_STANDBY)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "System Paused\n");
cause = SWITCH_CAUSE_SYSTEM_SHUTDOWN;
goto error;
}
tech_pvt->gateway_name = switch_core_session_strdup(nsession, gateway_ptr->name);
switch_channel_set_variable(nchannel, "sip_gateway_name", gateway_ptr->name);
@ -4490,6 +4492,12 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
goto error;
}
if (profile && sofia_test_pflag(profile, PFLAG_STANDBY)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "System Paused\n");
cause = SWITCH_CAUSE_SYSTEM_SHUTDOWN;
goto error;
}
if (profile->domain_name && strcmp(profile->domain_name, profile->name)) {
profile_name = profile->domain_name;
}