fix play and get digits when using phrase macros

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13244 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-05-06 18:00:28 +00:00
parent 5460efa78e
commit 2ca10c4f4f
1 changed files with 7 additions and 11 deletions

View File

@ -340,7 +340,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
switch_safe_free(substituted);
if (match && do_break && switch_true(do_break)) {
if ((match && do_break && switch_true(do_break)) || status == SWITCH_STATUS_BREAK) {
break;
}
@ -860,8 +860,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
char *argv[128] = { 0 };
int argc;
int cur;
switch_status_t rst;
switch_core_session_get_read_impl(session, &read_impl);
@ -927,8 +925,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if ((arg = strchr(dup, ':'))) {
*arg++ = '\0';
}
if ((rst = switch_ivr_phrase_macro(session, dup, arg, lang, args) != SWITCH_STATUS_SUCCESS)) {
return rst;
if ((status = switch_ivr_phrase_macro(session, dup, arg, lang, args)) != SWITCH_STATUS_SUCCESS) {
return status;
}
continue;
} else {
@ -951,8 +949,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
}
if (!switch_strlen_zero(engine) && !switch_strlen_zero(voice) && !switch_strlen_zero(text)) {
if ((rst = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
return rst;
if ((status = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
return status;
}
continue;
} else if (!switch_strlen_zero(engine) && !(voice && text)) {
@ -960,8 +958,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
engine = (char *) switch_channel_get_variable(channel, "tts_engine");
voice = (char *) switch_channel_get_variable(channel, "tts_voice");
if (engine && text) {
if ((rst = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
return rst;
if ((status = switch_ivr_speak_text(session, engine, voice, text, args)) != SWITCH_STATUS_SUCCESS) {
return status;
}
continue;
}
@ -1404,8 +1402,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
switch_core_timer_destroy(&timer);
}
switch_safe_free(abuf);
switch_core_session_reset(session, SWITCH_FALSE, SWITCH_TRUE);