]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix bug that didn't change voice when going menu-top
authorBrian West <brian@freeswitch.org>
Thu, 26 Feb 2009 17:17:35 +0000 (17:17 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 26 Feb 2009 17:17:35 +0000 (17:17 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12297 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_menu.c

index e74ed1e60111ab896cb7761f9faf5d6ea7890672..13f22b29db4a621a11bafbfe77c9cd2a89ede569 100644 (file)
@@ -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];