From ae23edad9caa2ad8c48cef415217d11603294f3b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 18 Apr 2012 14:49:00 -0500 Subject: [PATCH] FS-4111 --resolve --- src/switch_ivr_bridge.c | 2 ++ src/switch_ivr_originate.c | 5 +++++ src/switch_ivr_play_say.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 9051e3c8c3..206bd8787d 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -984,6 +984,7 @@ static switch_status_t signal_bridge_on_hibernate(switch_core_session_t *session } } switch_yield(20000); + switch_ivr_parse_all_messages(session); } } @@ -1337,6 +1338,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses while (switch_channel_get_state(peer_channel) == CS_EXCHANGE_MEDIA) { + switch_ivr_parse_all_messages(session); switch_cond_next(); } diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index ed84a351d7..3cad2e343a 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -49,6 +49,7 @@ static switch_status_t originate_on_consume_media_transmit(switch_core_session_t } else { switch_ivr_sleep(session, 10, SWITCH_FALSE, NULL); } + switch_ivr_parse_all_messages(session); } } @@ -944,6 +945,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t while (switch_channel_ready(peer_channel) && !switch_channel_media_ready(peer_channel)) { int diff = (int) (switch_micro_time_now() - start); + switch_ivr_parse_all_messages(session); + if (caller_channel && cancel_key) { if (switch_channel_has_dtmf(caller_channel)) { switch_dtmf_t dtmf = { 0, 0 }; @@ -1059,6 +1062,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t switch_channel_state_t peer_state = switch_channel_get_state(peer_channel); while (switch_channel_ready(peer_channel) && switch_channel_get_state(peer_channel) == peer_state) { + switch_ivr_parse_all_messages(session); switch_channel_ready(caller_channel); switch_yield(20000); } @@ -1314,6 +1318,7 @@ static void *SWITCH_THREAD_FUNC enterprise_originate_ringback_thread(switch_thre switch_core_session_read_lock(session); while (rb_data->running && switch_channel_ready(channel)) { + switch_ivr_parse_all_messages(session); if (status != SWITCH_STATUS_BREAK) { if (zstr(rb_data->ringback_data) || !strcasecmp(rb_data->ringback_data, "silence")) { status = switch_ivr_collect_digits_callback(session, NULL, 0, 0); diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index bc68cc50f4..f435c87026 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1597,6 +1597,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess switch_status_t tstatus; while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) { + switch_ivr_parse_all_messages(session); switch_yield(10000); } @@ -2260,6 +2261,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session switch_status_t tstatus = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) { + switch_ivr_parse_all_messages(session); switch_yield(10000); } @@ -2332,6 +2334,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session switch_status_t tstatus = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); while (switch_channel_ready(channel) && switch_channel_test_flag(channel, CF_HOLD)) { + switch_ivr_parse_all_messages(session); switch_yield(10000); }