From: Anthony Minessale Date: Mon, 27 Jun 2011 16:32:52 +0000 (-0500) Subject: parse events and messages in channel_ready X-Git-Tag: v1.2-rc1~108^2^2~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94148095b8f1ea6d3ddfbdac7d2ae2ef6735e6d3;p=thirdparty%2Ffreeswitch.git parse events and messages in channel_ready --- diff --git a/src/switch_channel.c b/src/switch_channel.c index 38f177234e..f236014887 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1693,8 +1693,6 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_ switch_assert(channel != NULL); - switch_ivr_parse_all_messages(channel->session); - if (check_media) { ret = ((switch_channel_test_flag(channel, CF_ANSWERED) || switch_channel_test_flag(channel, CF_EARLY_MEDIA)) && !switch_channel_test_flag(channel, CF_PROXY_MODE) && @@ -1716,6 +1714,10 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_ ret++; } + if (ret) { + switch_ivr_parse_all_events(channel->session); + } + return ret; }