[Freeswitch-svn] [commit] r13244 - freeswitch/trunk/src

FreeSWITCH SVN brian at freeswitch.org
Wed May 6 11:00:29 PDT 2009


Author: brian
Date: Wed May  6 13:00:28 2009
New Revision: 13244

Log:
 fix play and get digits when using phrase macros

Modified:
   freeswitch/trunk/src/switch_ivr_play_say.c

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Wed May  6 13:00:28 2009
@@ -340,7 +340,7 @@
 			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 @@
 	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 @@
 					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 @@
 				}
 
 				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 @@
 					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_core_timer_destroy(&timer);
 	}
 
-
-
 	switch_safe_free(abuf);
 
 	switch_core_session_reset(session, SWITCH_FALSE, SWITCH_TRUE);



More information about the Freeswitch-svn mailing list