0010_condition_xor.xml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <extension name="Logical XOR 1 false" >
  2. <condition field="destination_number" expression="^6040$"/>
  3. <condition regex="xor">
  4. <regex wday="1-7"/>
  5. <regex wday="1-7"/>
  6. <anti-action application="log" data="INFO Test PASSED!"/>
  7. <anti-action application="playback" data="ivr/ivr-thank_you_for_calling.wav"/>
  8. <action application="log" data="ERROR Test FAILED!"/>
  9. <action application="playback" data="ivr/ivr-no_no_no.wav"/>
  10. </condition>
  11. </extension>
  12. <extension name="Logical XOR 2 false" >
  13. <condition field="destination_number" expression="^6041$"/>
  14. <condition regex="xor">
  15. <regex field="destination_number" expression="."/>
  16. <regex field="destination_number" expression="."/>
  17. <anti-action application="log" data="INFO Test PASSED!"/>
  18. <anti-action application="playback" data="ivr/ivr-thank_you_for_calling.wav"/>
  19. <action application="log" data="ERROR Test FAILED!"/>
  20. <action application="playback" data="ivr/ivr-no_no_no.wav"/>
  21. </condition>
  22. </extension>
  23. <extension name="Logical XOR 1 true" >
  24. <condition field="destination_number" expression="^6042$"/>
  25. <condition regex="xor">
  26. <regex wday="1-7"/>
  27. <regex year="0"/>
  28. <regex year="0"/>
  29. <action application="log" data="INFO Test PASSED!"/>
  30. <action application="playback" data="ivr/ivr-thank_you_for_calling.wav"/>
  31. <anti-action application="log" data="ERROR Test FAILED!"/>
  32. <anti-action application="playback" data="ivr/ivr-no_no_no.wav"/>
  33. </condition>
  34. </extension>
  35. <extension name="Logical XOR 2 true" >
  36. <condition field="destination_number" expression="^6043$"/>
  37. <condition regex="xor">
  38. <regex field="destination_number" expression="."/>
  39. <regex field="destination_number" expression="^$"/>
  40. <regex field="destination_number" expression="^$"/>
  41. <action application="log" data="INFO Test PASSED!"/>
  42. <action application="playback" data="ivr/ivr-thank_you_for_calling.wav"/>
  43. <anti-action application="log" data="ERROR Test FAILED!"/>
  44. <anti-action application="playback" data="ivr/ivr-no_no_no.wav"/>
  45. </condition>
  46. </extension>