From: Brian West Date: Fri, 26 Dec 2008 17:09:09 +0000 (+0000) Subject: fix early media issue related to group_confirm_file X-Git-Tag: v1.0.2~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fda8c44ec2e4e3de4203f7576a732a1a929731b2;p=thirdparty%2Ffreeswitch.git fix early media issue related to group_confirm_file git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10949 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index e9a5f4dcec..b218275e42 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -39,6 +39,12 @@ static switch_status_t originate_on_consume_media_transmit(switch_core_session_t { switch_channel_t *channel = switch_core_session_get_channel(session); + if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) { + while (switch_channel_get_state(channel) == CS_CONSUME_MEDIA && !switch_channel_test_flag(channel, CF_TAGGED)) { + switch_ivr_sleep(session, 10, SWITCH_FALSE, NULL); + } + } + switch_channel_clear_state_handler(channel, &originate_state_handlers); return SWITCH_STATUS_FALSE;