2
0

demo-ivr.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <include>
  2. <macro name="demo_ivr_count">
  3. <input pattern="^(\d+)$">
  4. <match>
  5. <action function="play-file" data="voicemail/vm-you_have.wav"/>
  6. <action function="say" data="$1" method="pronounced" type="name_spelled"/>
  7. <action function="play-file" data="voicemail/vm-messages.wav"/>
  8. </match>
  9. </input>
  10. </macro>
  11. <macro name="demo_ivr_main_menu" pause="250"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
  12. <input pattern="(.*)">
  13. <match>
  14. <!-- string together several existing sound files to create one long greeting -->
  15. <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
  16. <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
  17. <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
  18. <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
  19. <!-- Menu option 1: Call FreeSWITCH conference-->
  20. <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
  21. <action function="execute" data="sleep(1500)"/>
  22. <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
  23. <action function="play-file" data="ivr/ivr-please.wav"/>
  24. <action function="play-file" data="voicemail/vm-press.wav"/>
  25. <action function="play-file" data="digits/1.wav"/>
  26. <!-- Menu option 2: Do FreeSWITCH echo test -->
  27. <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
  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/2.wav"/>
  31. <!-- Menu option 3: Listen to Music on Hold -->
  32. <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
  33. <action function="play-file" data="ivr/ivr-please.wav"/>
  34. <action function="play-file" data="voicemail/vm-press.wav"/>
  35. <action function="play-file" data="digits/3.wav"/>
  36. <!-- Menu option 4: Hear a sample submenu -->
  37. <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
  38. <action function="play-file" data="ivr/ivr-please.wav"/>
  39. <action function="play-file" data="voicemail/vm-press.wav"/>
  40. <action function="play-file" data="digits/4.wav"/>
  41. <!-- Menu option 5: Listen to screaming monkeys -->
  42. <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
  43. <action function="play-file" data="ivr/ivr-please.wav"/>
  44. <action function="play-file" data="voicemail/vm-press.wav"/>
  45. <action function="play-file" data="digits/5.wav"/>
  46. <!-- Menu option 9: Repeat these options -->
  47. <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
  48. <action function="play-file" data="ivr/ivr-please.wav"/>
  49. <action function="play-file" data="voicemail/vm-press.wav"/>
  50. <action function="play-file" data="digits/9.wav"/>
  51. <action function="execute" data="sleep(2000)"/>
  52. </match>
  53. </input>
  54. </macro>
  55. <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
  56. <!-- The short version has all the options but not the initial greeting -->
  57. <macro name="demo_ivr_main_menu_short" pause="250">
  58. <input pattern="(.*)">
  59. <match>
  60. <!-- Menu option 1: Call FreeSWITCH conference-->
  61. <action function="execute" data="sleep(1000)"/>
  62. <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
  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/1.wav"/>
  66. <!-- Menu option 2: Do FreeSWITCH echo test -->
  67. <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
  68. <action function="play-file" data="ivr/ivr-please.wav"/>
  69. <action function="play-file" data="voicemail/vm-press.wav"/>
  70. <action function="play-file" data="digits/2.wav"/>
  71. <!-- Menu option 3: Listen to Music on Hold -->
  72. <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
  73. <action function="play-file" data="ivr/ivr-please.wav"/>
  74. <action function="play-file" data="voicemail/vm-press.wav"/>
  75. <action function="play-file" data="digits/3.wav"/>
  76. <!-- Menu option 4: Hear a sample submenu -->
  77. <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
  78. <action function="play-file" data="ivr/ivr-please.wav"/>
  79. <action function="play-file" data="voicemail/vm-press.wav"/>
  80. <action function="play-file" data="digits/4.wav"/>
  81. <!-- Menu option 5: Listen to screaming monkeys -->
  82. <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
  83. <action function="play-file" data="ivr/ivr-please.wav"/>
  84. <action function="play-file" data="voicemail/vm-press.wav"/>
  85. <action function="play-file" data="digits/5.wav"/>
  86. <!-- Menu option 9: Repeat these options -->
  87. <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
  88. <action function="play-file" data="ivr/ivr-please.wav"/>
  89. <action function="play-file" data="voicemail/vm-press.wav"/>
  90. <action function="play-file" data="digits/9.wav"/>
  91. <action function="execute" data="sleep(2000)"/>
  92. </match>
  93. </input>
  94. </macro>
  95. <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
  96. <macro name="demo_ivr_sub_menu">
  97. <input pattern="(.*)">
  98. <match>
  99. <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
  100. <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
  101. <!-- Menu option *: Return to top menu -->
  102. <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
  103. <action function="play-file" data="ivr/ivr-please.wav"/>
  104. <action function="play-file" data="voicemail/vm-press.wav"/>
  105. <action function="play-file" data="digits/star.wav"/>
  106. </match>
  107. </input>
  108. </macro>
  109. <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
  110. <!-- The short version has all the options but not the initial greeting -->
  111. <macro name="demo_ivr_sub_menu_short">
  112. <input pattern="(.*)">
  113. <match>
  114. <!-- Menu option *: Return to top menu -->
  115. <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
  116. <action function="play-file" data="ivr/ivr-please.wav"/>
  117. <action function="play-file" data="voicemail/vm-press.wav"/>
  118. <action function="play-file" data="digits/star.wav"/>
  119. </match>
  120. </input>
  121. </macro>
  122. </include>
  123. <!--
  124. For Emacs:
  125. Local Variables:
  126. mode:xml
  127. indent-tabs-mode:nil
  128. tab-width:2
  129. c-basic-offset:2
  130. End:
  131. For VIM:
  132. vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
  133. -->