From e76486968e9ea11a62ae52017e9b24c912e4133f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 12 Mar 2008 16:40:01 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7884 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 0f76abffa5..1321c352c9 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -316,7 +316,13 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se } if (stream) { - switch_ivr_broadcast(b_uuid, stream, SMF_ECHO_ALEG | SMF_LOOP); + if ((b_session = switch_core_session_locate(b_uuid))) { + switch_channel_t *b_channel = switch_core_session_get_channel(b_session); + + switch_ivr_broadcast(b_uuid, stream, SMF_ECHO_ALEG | SMF_LOOP); + switch_channel_wait_for_flag(b_channel, CF_BROADCAST, SWITCH_TRUE, 5000); + switch_core_session_rwunlock(b_session); + } } else { b_uuid = NULL; } @@ -621,6 +627,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess for (i = 0; i < x; i++) { if (strchr(terminators, buf[i]) && terminator != NULL) { *terminator = buf[i]; + buf[i] = '\0'; return SWITCH_STATUS_SUCCESS; } } @@ -683,7 +690,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_sess *terminator = dtmf.digit; return SWITCH_STATUS_SUCCESS; } - + + buf[x++] = dtmf.digit; buf[x] = '\0'; if (x >= buflen || x >= maxdigits) {