parse events and messages in channel_ready

This commit is contained in:
Anthony Minessale 2011-06-27 11:32:52 -05:00
parent 4962542b40
commit 94148095b8
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}