clear controlled flag on recovered calls

This commit is contained in:
Anthony Minessale 2010-11-23 18:03:56 -06:00
parent 58c28aabc8
commit 0bd8d187e0
1 changed files with 4 additions and 0 deletions

View File

@ -763,6 +763,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
write_frame.samples = write_frame.datalen / sizeof(int16_t);
}
if (switch_channel_test_flag(channel, CF_RECOVERED) && switch_channel_test_flag(channel, CF_CONTROLLED)) {
switch_channel_clear_flag(channel, CF_CONTROLLED);
}
if (switch_channel_test_flag(channel, CF_CONTROLLED)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot park channels that are under control already.\n");
return SWITCH_STATUS_FALSE;