]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3358 please test and close if it works
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Jun 2011 18:21:20 +0000 (13:21 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 20 Jun 2011 18:21:20 +0000 (13:21 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_channel.c
src/switch_core_session.c

index fb2e161b16ebdba876f9c275e877c712e2d8f4a6..e6572df8b7ed761552724e57aac7d9bb21822f0b 100644 (file)
@@ -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 {
index 5683d741f741a1857648301296e1df12005659d3..81c903cb4afc6935c38af245172b6bfbafbd042f 100644 (file)
@@ -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) &&
index 35980084e20ab9dd1392940857398612957c6afb..5e344026d6fa6853840714010fc731aa28779bda 100644 (file)
@@ -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)) {