From e71b238e9e30d5681f0f5c0546e4a9a6be7bead3 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 30 Apr 2012 18:13:32 -0500 Subject: [PATCH] FS-4166 --- src/switch_ivr_bridge.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 45155744ff..dc95a43114 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -660,13 +660,15 @@ static switch_status_t audio_bridge_on_exchange_media(switch_core_session_t *ses if (!switch_channel_test_flag(channel, CF_TRANSFER) && !switch_channel_test_flag(channel, CF_REDIRECT) && !switch_channel_test_flag(channel, CF_XFER_ZOMBIE) && bd && !bd->clean_exit && state != CS_PARK && state != CS_ROUTING && state == CS_EXCHANGE_MEDIA && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) { - if (switch_channel_test_flag(channel, CF_INTERCEPT) && !switch_channel_test_flag(channel, CF_INTERCEPTED)) { - switch_channel_hangup(channel, SWITCH_CAUSE_PICKED_OFF); - } else { - if (!switch_channel_test_flag(channel, CF_ANSWERED)) { - switch_channel_hangup(channel, SWITCH_CAUSE_ORIGINATOR_CANCEL); + if (!switch_channel_test_flag(channel, CF_INTERCEPTED)) { + if (switch_channel_test_flag(channel, CF_INTERCEPT)) { + switch_channel_hangup(channel, SWITCH_CAUSE_PICKED_OFF); } else { - switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + if (!switch_channel_test_flag(channel, CF_ANSWERED)) { + switch_channel_hangup(channel, SWITCH_CAUSE_ORIGINATOR_CANCEL); + } else { + switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + } } } }