2
0

demo-ivr.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?xml version="1.0" encoding="Windows-1252"?>
  2. <include><!--This line will be ignored it's here to validate the xml and is optional -->
  3. <macro name="demo_ivr_count">
  4. <input pattern="^(\d+)$">
  5. <match>
  6. <action function="play-file" data="voicemail/vm-you_have.wav"/>
  7. <action function="say" data="$1" method="pronounced" type="name_spelled"/>
  8. <action function="play-file" data="voicemail/vm-messages.wav"/>
  9. </match>
  10. </input>
  11. </macro>
  12. <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 -->
  13. <input pattern="(.*)">
  14. <match>
  15. <!-- string together several existing sound files to create one long greeting -->
  16. <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
  17. <action function="execute" data="sleep(250)"/>
  18. <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
  19. <action function="execute" data="sleep(250)"/>
  20. <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
  21. <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
  22. <action function="execute" data="sleep(250)"/>
  23. <!-- Menu option 1: Call FreeSWITCH conference-->
  24. <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
  25. <action function="execute" data="sleep(1500)"/>
  26. <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
  27. <action function="execute" data="sleep(250)"/>
  28. <action function="play-file" data="ivr/ivr-please.wav"/>
  29. <action function="play-file" data="voicemail/vm-press.wav"/>
  30. <action function="play-file" data="digits/1.wav"/>
  31. <action function="execute" data="sleep(250)"/>
  32. <!-- Menu option 2: Do FreeSWITCH echo test -->
  33. <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
  34. <action function="execute" data="sleep(250)"/>
  35. <action function="play-file" data="ivr/ivr-please.wav"/>
  36. <action function="play-file" data="voicemail/vm-press.wav"/>
  37. <action function="play-file" data="digits/2.wav"/>
  38. <action function="execute" data="sleep(250)"/>
  39. <!-- Menu option 3: Listen to Music on Hold -->
  40. <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
  41. <action function="execute" data="sleep(250)"/>
  42. <action function="play-file" data="ivr/ivr-please.wav"/>
  43. <action function="play-file" data="voicemail/vm-press.wav"/>
  44. <action function="play-file" data="digits/3.wav"/>
  45. <action function="execute" data="sleep(250)"/>
  46. <!-- Menu option 4: Hear a sample submenu -->
  47. <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
  48. <action function="execute" data="sleep(250)"/>
  49. <action function="play-file" data="ivr/ivr-please.wav"/>
  50. <action function="play-file" data="voicemail/vm-press.wav"/>
  51. <action function="play-file" data="digits/4.wav"/>
  52. <action function="execute" data="sleep(250)"/>
  53. <!-- Menu option 5: Listen to screaming monkeys -->
  54. <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
  55. <action function="execute" data="sleep(250)"/>
  56. <action function="play-file" data="ivr/ivr-please.wav"/>
  57. <action function="play-file" data="voicemail/vm-press.wav"/>
  58. <action function="play-file" data="digits/5.wav"/>
  59. <action function="execute" data="sleep(250)"/>
  60. <!-- Menu option 9: Repeat these options -->
  61. <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
  62. <action function="execute" data="sleep(250)"/>
  63. <action function="play-file" data="ivr/ivr-please.wav"/>
  64. <action function="play-file" data="voicemail/vm-press.wav"/>
  65. <action function="play-file" data="digits/9.wav"/>
  66. <action function="execute" data="sleep(2000)"/>
  67. </match>
  68. </input>
  69. </macro>
  70. <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
  71. <!-- The short version has all the options but not the initial greeting -->
  72. <macro name="demo_ivr_main_menu_short">
  73. <input pattern="(.*)">
  74. <match>
  75. <!-- Menu option 1: Call FreeSWITCH conference-->
  76. <action function="execute" data="sleep(1000)"/>
  77. <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
  78. <action function="execute" data="sleep(250)"/>
  79. <action function="play-file" data="ivr/ivr-please.wav"/>
  80. <action function="play-file" data="voicemail/vm-press.wav"/>
  81. <action function="play-file" data="digits/1.wav"/>
  82. <action function="execute" data="sleep(250)"/>
  83. <!-- Menu option 2: Do FreeSWITCH echo test -->
  84. <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
  85. <action function="execute" data="sleep(250)"/>
  86. <action function="play-file" data="ivr/ivr-please.wav"/>
  87. <action function="play-file" data="voicemail/vm-press.wav"/>
  88. <action function="play-file" data="digits/2.wav"/>
  89. <action function="execute" data="sleep(250)"/>
  90. <!-- Menu option 3: Listen to Music on Hold -->
  91. <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
  92. <action function="execute" data="sleep(250)"/>
  93. <action function="play-file" data="ivr/ivr-please.wav"/>
  94. <action function="play-file" data="voicemail/vm-press.wav"/>
  95. <action function="play-file" data="digits/3.wav"/>
  96. <action function="execute" data="sleep(250)"/>
  97. <!-- Menu option 4: Hear a sample submenu -->
  98. <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
  99. <action function="execute" data="sleep(250)"/>
  100. <action function="play-file" data="ivr/ivr-please.wav"/>
  101. <action function="play-file" data="voicemail/vm-press.wav"/>
  102. <action function="play-file" data="digits/4.wav"/>
  103. <action function="execute" data="sleep(250)"/>
  104. <!-- Menu option 5: Listen to screaming monkeys -->
  105. <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
  106. <action function="execute" data="sleep(250)"/>
  107. <action function="play-file" data="ivr/ivr-please.wav"/>
  108. <action function="play-file" data="voicemail/vm-press.wav"/>
  109. <action function="play-file" data="digits/5.wav"/>
  110. <action function="execute" data="sleep(250)"/>
  111. <!-- Menu option 9: Repeat these options -->
  112. <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
  113. <action function="execute" data="sleep(250)"/>
  114. <action function="play-file" data="ivr/ivr-please.wav"/>
  115. <action function="play-file" data="voicemail/vm-press.wav"/>
  116. <action function="play-file" data="digits/9.wav"/>
  117. <action function="execute" data="sleep(2000)"/>
  118. </match>
  119. </input>
  120. </macro>
  121. <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
  122. <macro name="demo_ivr_sub_menu">
  123. <input pattern="(.*)">
  124. <match>
  125. <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
  126. <action function="execute" data="sleep(250)"/>
  127. <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
  128. <action function="execute" data="sleep(250)"/>
  129. <!-- Menu option *: Return to top menu -->
  130. <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
  131. <action function="execute" data="sleep(250)"/>
  132. <action function="play-file" data="ivr/ivr-please.wav"/>
  133. <action function="play-file" data="voicemail/vm-press.wav"/>
  134. <action function="play-file" data="digits/star.wav"/>
  135. <action function="execute" data="sleep(250)"/>
  136. </match>
  137. </input>
  138. </macro>
  139. <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
  140. <!-- The short version has all the options but not the initial greeting -->
  141. <macro name="demo_ivr_sub_menu_short">
  142. <input pattern="(.*)">
  143. <match>
  144. <!-- Menu option *: Return to top menu -->
  145. <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
  146. <action function="execute" data="sleep(250)"/>
  147. <action function="play-file" data="ivr/ivr-please.wav"/>
  148. <action function="play-file" data="voicemail/vm-press.wav"/>
  149. <action function="play-file" data="digits/star.wav"/>
  150. <action function="execute" data="sleep(250)"/>
  151. </match>
  152. </input>
  153. </macro>
  154. </include><!--This line will be ignored it's here to validate the xml and is optional -->