features.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
  2. <include>
  3. <context name="features">
  4. <!-- In call Transfer for phones without a transfer button -->
  5. <extension name="dx">
  6. <condition field="destination_number" expression="^dx$">
  7. <action application="answer"/>
  8. <action application="read" data="11 11 'tone_stream://%(10000,0,350,440)' digits 5000 #"/>
  9. <action application="execute_extension" data="is_transfer XML features"/>
  10. </condition>
  11. </extension>
  12. <extension name="att_xfer">
  13. <condition field="destination_number" expression="^att_xfer$">
  14. <action application="read" data="3 4 'tone_stream://%(10000,0,350,440)' digits 30000 #"/>
  15. <action application="set" data="origination_cancel_key=#"/>
  16. <action application="att_xfer" data="user/${digits}@$${domain}"/>
  17. </condition>
  18. </extension>
  19. <extension name="is_transfer">
  20. <condition field="destination_number" expression="^is_transfer$"/>
  21. <condition field="${digits}" expression="^(\d+)$">
  22. <action application="transfer" data="-bleg ${digits} XML default"/>
  23. <anti-action application="eval" data="cancel transfer"/>
  24. </condition>
  25. </extension>
  26. <!-- Used to transfer both legs into a conference -->
  27. <extension name="cf">
  28. <condition field="destination_number" expression="^cf$">
  29. <action application="answer"/>
  30. <action application="transfer" data="-both 30${dialed_extension:2} XML default"/>
  31. </condition>
  32. </extension>
  33. <extension name="please_hold">
  34. <condition field="destination_number" expression="^(10[01][0-9])$">
  35. <action application="set" data="transfer_ringback=$${hold_music}"/>
  36. <action application="answer"/>
  37. <action application="sleep" data="1500"/>
  38. <action application="playback" data="ivr/ivr-hold_connect_call.wav"/>
  39. <action application="transfer" data="$1 XML default"/>
  40. </condition>
  41. </extension>
  42. <extension name="is_zrtp_secure" continue="true">
  43. <condition field="${zrtp_secure_media_confirmed}" expression="^true$">
  44. <action application="sleep" data="1000"/>
  45. <action application="playback" data="misc/call_secured.wav"/>
  46. <anti-action application="eval" data="not_secure"/>
  47. </condition>
  48. </extension>
  49. <extension name="is_secure" continue="true">
  50. <!-- Only Truly consider it secure if its TLS and SRTP -->
  51. <condition field="${sip_via_protocol}" expression="tls"/>
  52. <condition field="${rtp_secure_media_confirmed}" expression="^true$">
  53. <action application="sleep" data="1000"/>
  54. <action application="playback" data="misc/call_secured.wav"/>
  55. <anti-action application="eval" data="not_secure"/>
  56. </condition>
  57. </extension>
  58. </context>
  59. </include>