2
0

features.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_secure" continue="true">
  43. <!-- Only Truly consider it secure if its TLS and SRTP -->
  44. <condition field="${sip_via_protocol}" expression="tls"/>
  45. <condition field="${rtp_secure_media_confirmed}" expression="^true$">
  46. <action application="sleep" data="1000"/>
  47. <action application="playback" data="misc/call_secured.wav"/>
  48. <anti-action application="eval" data="not_secure"/>
  49. </condition>
  50. </extension>
  51. </context>
  52. </include>