[Freeswitch-svn] [commit] r3332 - in freeswitch/trunk/src: . include
Freeswitch SVN
anthm at freeswitch.org
Sun Nov 12 15:50:18 EST 2006
Author: anthm
Date: Sun Nov 12 15:50:18 2006
New Revision: 3332
Modified:
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/switch_ivr.c
Log:
update
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Sun Nov 12 15:50:18 2006
@@ -423,6 +423,7 @@
SWITCH_IVR_ACTION_EXECMENU, /* Goto another menu in the stack. */
SWITCH_IVR_ACTION_EXECAPP, /* Execute an application. */
SWITCH_IVR_ACTION_PLAYSOUND, /* Play a sound. */
+ SWITCH_IVR_ACTION_SAYTEXT, /* say text. */
SWITCH_IVR_ACTION_BACK, /* Go back 1 menu. */
SWITCH_IVR_ACTION_TOMAIN, /* Go back to the top level menu. */
SWITCH_IVR_ACTION_TRANSFER, /* Transfer caller to another ext. */
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Sun Nov 12 15:50:18 2006
@@ -3464,10 +3464,12 @@
ptr = menu->ptr;
}
- if (menu->tts_engine && menu->tts_voice) {
- switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, sound, ptr, len);
- } else {
+ if (*sound == '/' || *sound == '\\') {
switch_ivr_play_file(session, NULL, sound, NULL, NULL, ptr, len);
+ } else {
+ if (menu->tts_engine && menu->tts_voice) {
+ switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, sound, ptr, len);
+ }
}
if (need) {
@@ -3550,6 +3552,11 @@
break;
case SWITCH_IVR_ACTION_PLAYSOUND:
status = switch_ivr_play_file(session, NULL, aptr, NULL, NULL, NULL, 0);
+ break;
+ case SWITCH_IVR_ACTION_SAYTEXT:
+ if (menu->tts_engine && menu->tts_voice) {
+ switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, aptr, NULL, 0);
+ }
break;
case SWITCH_IVR_ACTION_TRANSFER:
switch_ivr_session_transfer(session, aptr, NULL, NULL);
More information about the Freeswitch-svn
mailing list