2
0

features.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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="is_transfer">
  13. <condition field="destination_number" expression="^is_transfer$"/>
  14. <condition field="${digits}" expression="^(\d+)$">
  15. <action application="transfer" data="-bleg ${digits} XML default"/>
  16. <anti-action application="eval" data="cancel transfer"/>
  17. </condition>
  18. </extension>
  19. <!-- Used to transfer both legs into a conference -->
  20. <extension name="cf">
  21. <condition field="destination_number" expression="^cf$">
  22. <action application="answer"/>
  23. <action application="transfer" data="-both 30${dialed_extension:2} XML default"/>
  24. </condition>
  25. </extension>
  26. <extension name="please_hold">
  27. <condition field="destination_number" expression="^(10[01][0-9])$">
  28. <action application="set" data="transfer_ringback=$${hold_music}"/>
  29. <action application="answer"/>
  30. <action application="sleep" data="1500"/>
  31. <action application="playback" data="ivr/ivr-hold_connect_call.wav"/>
  32. <action application="transfer" data="$1 XML default"/>
  33. </condition>
  34. </extension>
  35. <extension name="is_secure">
  36. <!-- Only Truly consider it secure if its TLS and SRTP -->
  37. <condition field="${sip_via_protocol}" expression="tls"/>
  38. <condition field="${rtp_secure_media_confirmed}" expression="^true$">
  39. <action application="sleep" data="1000"/>
  40. <action application="playback" data="misc/call_secured.wav"/>
  41. <anti-action application="eval" data="not_secure"/>
  42. </condition>
  43. </extension>
  44. </context>
  45. </include>