From 00ef45e96b56aca69b6235004a669ad5db2dd472 Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 26 Feb 2009 17:17:35 +0000 Subject: [PATCH] fix bug that didn't change voice when going menu-top git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12297 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_menu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index e74ed1e601..13f22b29db 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -389,7 +389,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s channel = switch_core_session_get_channel(session); - if (!(menu = switch_ivr_menu_find(stack, name))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Menu!\n"); switch_goto_status(SWITCH_STATUS_FALSE, end); @@ -443,6 +442,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s char substituted[1024]; char *use_arg = ap->arg; + if(!switch_strlen_zero(menu->tts_engine) && !switch_strlen_zero(menu->tts_voice)) { + switch_channel_set_variable(channel, "tts_engine", menu->tts_engine); + switch_channel_set_variable(channel, "tts_voice", menu->tts_voice); + } + if (ap->re) { switch_regex_t *re = NULL; int ovector[30];