[Freeswitch-svn] [commit] r8019 - in freeswitch/trunk/conf: autoload_configs lang/en lang/en/demo

Freeswitch SVN brian at freeswitch.org
Thu Apr 3 22:27:47 EDT 2008


Author: brian
Date: Thu Apr  3 22:27:46 2008
New Revision: 8019

Added:
   freeswitch/trunk/conf/lang/en/demo/demo-ivr.xml
Modified:
   freeswitch/trunk/conf/autoload_configs/ivr.conf.xml
   freeswitch/trunk/conf/lang/en/en.xml

Log:
add ivr demo thanks mcollins.

Modified: freeswitch/trunk/conf/autoload_configs/ivr.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/ivr.conf.xml	(original)
+++ freeswitch/trunk/conf/autoload_configs/ivr.conf.xml	Thu Apr  3 22:27:46 2008
@@ -1,53 +1,47 @@
-<configuration name="ivr.conf" description="IVR menus">
-  <menus>
-    <menu name="demo"
-          greet-long="soundfiles/ivr/demo/greet-long.wav"
-          greet-short="soundfiles/ivr/demo/greet-short.wav"
-          invalid-sound="soundfiles/ivr/invalid.wav"
-          exit-sound="soundfiles/ivr/exit.wav" timeout ="15"
-          max-failures="3">
-      <entry action="menu-exit" digits="*"/>
-      <entry action="menu-play-sound" digits="1" params="soundfiles/features.wav"/>
-      <entry action="menu-sub" digits="2" param="demo2"/>
-      <entry action="menu-exec-app" digits="3" param="bridge sofia/$${domain}/888 at conference.freeswtich.org"/>
-      <entry action="menu-call-transfer" digits="4" param="888"/>
-      <entry action="menu-sub" digits="8" param="menu8"/>
-    </menu>
-
-    <menu name="demo2"
-          greet-long="soundfiles/ivr/demo2/greet-long.wav"
-          greet-short="soundfiles/ivr/demo2/greet-short.wav"
-          invalid-sound="soundfiles/ivr/invalid.wav"
-          exit-sound="soundfiles/ivr/exit.wav"
-          timeout ="15"
-          max-failures="3">
-      <entry action="menu-back" digits="#"/>
-      <entry action="menu-top" digits="*"/>
-    </menu>
-    
-    <menu name="demo3"
-          greet-long="say:Press 1 to join the conference, Press 2 to join the other conference"
-          greet-short="say:Press 1 to join the conference, Press 2 to join the other conference"
-          invalid-sound="say:invalid extension"
-          exit-sound="say:exit sound" timeout ="15"
-          max-failures="3"
-          tts-voice="callie" tts-engine="cepstral">
-      <entry action="menu-exit" digits="*"/>
-      <!-- <entry action="menu-say-text" digits="1" param="You pressed 1"/> -->
-      <entry action="menu-call-transfer" digits="1" param="1000"/>
-      <entry action="menu-call-transfer" digits="2" param="1001"/>
-    </menu>
-
-    <menu name="menu8"
-          greet-long="/soundfiles/ivr/menu8/greet-long.wav"
-          greet-short="/soundfiles/ivr/menu8/greet-short.wav"
-          invalid-sound="/soundfiles/ivr/menu8/invalid.wav"
-          exit-sound="/soundfiles/ivr/menu8/exit.wav"
-          timeout ="15"
-          max-failures="3">
-      <entry action="menu-back" digits="#"/>
-      <entry action="menu-play-sound" digits="4" param="soundfiles/4.wav"/>
-      <entry action="menu-top" digits="*"/>
-    </menu>
-  </menus>
-</configuration>
+<configuration name="ivr.conf" description="IVR menus">
+  <menus>
+    <!-- demo IVR setup -->
+    <!-- demo IVR, Main Menu -->
+    <menu name="demo_ivr"
+          greet-long="phrase:demo_ivr_main_menu"
+          greet-short="phrase:demo_ivr_main_menu_short""
+          invalid-sound="voicemail/vm-hello.wav"
+          exit-sound="voicemail/vm-goodbye.wav"
+          timeout ="15"
+          max-failures="3">
+      <entry action="menu-exec-app" digits="1" param="bridge sofia/$${domain}/888 at conference.freeswtich.org"/>
+      <entry action="menu-call-transfer" digits="2" param="9996"/>    <!-- FS echo -->
+      <entry action="menu-call-transfer" digits="3" param="9999"/>    <!-- MOH -->
+      <entry action="menu-sub" digits="4" param="demo_ivr_submenu"/>  <!-- demo sub menu -->
+      <entry action="menu-call-transfer" digits="5" param="1234*256"/>    <!-- Screaming monkeys -->
+      <entry action="menu-top" digits="9" param="demo_ivr"/>          <!-- Repeat this menu -->
+    </menu>
+
+    <!-- Demo IVR, Sub Menu -->
+    <menu name="demo_ivr_submenu"
+        greet-long="phrase:demo_ivr_sub_menu"
+        greet-short="phrase:demo_ivr_sub_menu_short"
+        invalid-sound="voicemail/vm-hello.wav"
+        exit-sound="voicemail/vm-goodbye.wav" timeout="15"
+        max-failures="3">
+      <entry action="menu-top" digits="*"/>
+     </menu>
+  </menus>
+</configuration>
+
+
+<!-- TTS sample; non-functional but it demonstrates say: and TTS -->
+<!--
+    <menu name="demo3"
+          greet-long="say:Press 1 to join the conference, Press 2 to join the other conference"
+          greet-short="say:Press 1 to join the conference, Press 2 to join the other conference"
+          invalid-sound="say:invalid extension"
+          exit-sound="say:exit sound" timeout ="15"
+          max-failures="3"
+          tts-voice="callie" tts-engine="cepstral">
+      <entry action="menu-exit" digits="*"/>
+      <entry action="menu-say-text" digits="1" param="You pressed 1"/>
+      <entry action="menu-call-transfer" digits="2" param="1000"/>
+      <entry action="menu-call-transfer" digits="3" param="1001"/>
+    </menu>
+-->

Added: freeswitch/trunk/conf/lang/en/demo/demo-ivr.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/lang/en/demo/demo-ivr.xml	Thu Apr  3 22:27:46 2008
@@ -0,0 +1,149 @@
+<include><!--This line will be ignored it's here to validate the xml and is optional -->
+
+  <macro name="demo_ivr_main_menu"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
+    <input pattern="(.*)">
+      <match>
+        <!-- string together several existing sound files to create one long greeting -->
+        <action function="execute" data="answer"/>
+        <action function="execute" data="sleep(1000)"/>
+        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
+        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 1: Call FreeSWITCH conference-->
+        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/1.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 2: Do FreeSWITCH echo test -->
+        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/2.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 3: Listen to Music on Hold -->
+        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/3.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 4: Hear a sample submenu -->
+        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/4.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 5: Listen to screaming monkeys -->
+        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/5.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 9: Repeat these options -->
+        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/9.wav"/>
+        <action function="execute" data="sleep(6000)"/>
+      </match>
+    </input>
+  </macro>
+
+  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
+  <!-- The short version has all the options but not the initial greeting -->
+  <macro name="demo_ivr_main_menu_short"> 
+    <input pattern="(.*)">
+      <match>
+        <!-- Menu option 1: Call FreeSWITCH conference-->
+        <action function="execute" data="sleep(1000)"/>
+        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/1.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 2: Do FreeSWITCH echo test -->
+        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/2.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 3: Listen to Music on Hold -->
+        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/3.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 4: Hear a sample submenu -->
+        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/4.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 5: Listen to screaming monkeys -->
+        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/5.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option 9: Repeat these options -->
+        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/9.wav"/>
+        <action function="execute" data="sleep(6000)"/>
+      </match>
+    </input>
+  </macro>
+
+  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
+  <macro name="demo_ivr_sub_menu">
+    <input pattern="(.*)">
+      <match>
+        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <!-- Menu option *: Return to top menu -->
+        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/star.wav"/>
+        <action function="execute" data="sleep(250)"/>
+      </match>
+    </input>
+  </macro>
+
+  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
+  <!-- The short version has all the options but not the initial greeting -->
+  <macro name="demo_ivr_sub_menu_short"> 
+    <input pattern="(.*)">
+      <match>
+        <!-- Menu option *: Return to top menu -->
+        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
+        <action function="execute" data="sleep(250)"/>
+        <action function="play-file" data="ivr/ivr-please.wav"/>
+        <action function="play-file" data="voicemail/vm-press.wav"/>
+        <action function="play-file" data="digits/star.wav"/>
+        <action function="execute" data="sleep(250)"/>
+      </match>
+    </input>
+  </macro>
+
+</include><!--This line will be ignored it's here to validate the xml and is optional -->

Modified: freeswitch/trunk/conf/lang/en/en.xml
==============================================================================
--- freeswitch/trunk/conf/lang/en/en.xml	(original)
+++ freeswitch/trunk/conf/lang/en/en.xml	Thu Apr  3 22:27:46 2008
@@ -1,7 +1,7 @@
-<include>
-  <language name="en" sound-path="$${base_dir}/sounds/en/us/callie" tts-engine="cepstral" tts-voice="callie">
-    <X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
-    <!--voicemail_en_tts is purely implemented with tts, we need a files based implementation too -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
-  </language>
-</include>
+<include>
+  <language name="en" sound-path="$${base_dir}/sounds/en/us/callie" tts-engine="cepstral" tts-voice="callie">
+    <X-PRE-PROCESS cmd="include" data="demo/demo*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
+    <!--voicemail_en_tts is purely implemented with tts, we need a files based implementation too -->
+    <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
+  </language>
+</include>



More information about the Freeswitch-svn mailing list