From: Anthony Minessale Date: Mon, 20 Jun 2011 18:21:20 +0000 (-0500) Subject: FS-3358 please test and close if it works X-Git-Tag: v1.2-rc1~108^2^2~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8decee307bb0dd9d0ea24dcc25dcb7e488393a98;p=thirdparty%2Ffreeswitch.git FS-3358 please test and close if it works --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index fb2e161b16..e6572df8b7 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -929,6 +929,8 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f } while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session) && !switch_channel_test_flag(channel, CF_REQ_MEDIA))) { + switch_ivr_parse_all_messages(tech_pvt->session); + if (--sanity && switch_channel_up(channel)) { switch_yield(10000); } else { diff --git a/src/switch_channel.c b/src/switch_channel.c index 5683d741f7..81c903cb4a 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1693,6 +1693,8 @@ 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) && diff --git a/src/switch_core_session.c b/src/switch_core_session.c index 35980084e2..5e344026d6 100644 --- a/src/switch_core_session.c +++ b/src/switch_core_session.c @@ -809,7 +809,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_ switch_assert(session != NULL); - if (session->message_queue) { + if (session->message_queue && switch_queue_size(session->message_queue)) { if ((status = (switch_status_t) switch_queue_trypop(session->message_queue, &pop)) == SWITCH_STATUS_SUCCESS) { *message = (switch_core_session_message_t *) pop; if ((*message)->delivery_time && (*message)->delivery_time > switch_epoch_time_now(NULL)) {