From 0bd8d187e0a58c708667416f63f30e30c344c295 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 23 Nov 2010 18:03:56 -0600 Subject: [PATCH] clear controlled flag on recovered calls --- src/switch_ivr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index f076f6cb9f..df88451a3d 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -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;