Advertisement
oioki

test.vxml

Nov 19th, 2012
1,454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.12 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <vxml version="2.0" base="flash0:/test/test.vxml">
  3.  
  4. <!-- Time is in UTC -->
  5. <!-- Day of week: 0 - sunday, 1 - monday ... 6 - sunday -->
  6. <var name="VAR_Hour" expr="new Date().getHours()"/>
  7. <var name="VAR_Day" expr="new Date().getDay()"/>
  8.  
  9. <!-- Time condition -->
  10. <form id="IVR_TimeCondition">
  11.     <block>
  12.         <if cond="5 &lt;= VAR_Hour &amp;&amp; VAR_Hour &lt; 14 &amp;&amp; 0 &lt; VAR_Day &amp;&amp; VAR_Day &lt; 6">
  13.             <goto next="#IVR_Business" />
  14.         <else />
  15.             <goto next="#IVR_NonBusiness" />
  16.         </if>
  17.     </block>
  18. </form>
  19.  
  20. <!-- Non business hours -->
  21. <form id="IVR_NonBusiness">
  22.     <block>
  23.         <prompt><audio src="flash0:/test/ivr2.wav"/></prompt>
  24.     </block>
  25. </form>
  26.  
  27. <!-- Business hours -->
  28. <form id="IVR_Business">
  29.     <block>
  30.         <prompt><audio src="flash0:/test/ivr1.wav"/></prompt>
  31.     </block>
  32.     <transfer name="mycall" transferaudio="flash0:/test/music.wav" bridge="false" dest="phone://123">
  33.         <filled>
  34.             <log>TRANSFER RETURNED: <value expr="mycall"/></log>
  35.         </filled>
  36.     </transfer>
  37. </form>
  38.  
  39. </vxml>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement