2
0

public.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!--
  2. NOTICE:
  3. This context is usually accessed via the external sip profile listening on port 5080.
  4. It is recommended to have separate inbound and outbound contexts. Not only for security
  5. but clearing up why you would need to do such a thing. You don't want outside un-authenticated
  6. callers hitting your default context which allows dialing calls thru your providers and results
  7. in Toll Fraud.
  8. -->
  9. <!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
  10. <include>
  11. <context name="public">
  12. <extension name="unloop">
  13. <condition field="${unroll_loops}" expression="^true$"/>
  14. <condition field="${sip_looped_call}" expression="^true$">
  15. <action application="deflect" data="${destination_number}"/>
  16. </condition>
  17. </extension>
  18. <!--
  19. Tag anything pass thru here as an outside_call so you can make sure not
  20. to create any routing loops based on the conditions that it came from
  21. the outside of the switch.
  22. -->
  23. <extension name="outside_call" continue="true">
  24. <condition>
  25. <action application="set" data="outside_call=true"/>
  26. <action application="export" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
  27. </condition>
  28. </extension>
  29. <extension name="call_debug" continue="true">
  30. <condition field="${call_debug}" expression="^true$" break="never">
  31. <action application="info"/>
  32. </condition>
  33. </extension>
  34. <extension name="public_extensions">
  35. <condition field="destination_number" expression="^(10[01][0-9])$">
  36. <action application="transfer" data="$1 XML default"/>
  37. </condition>
  38. </extension>
  39. <!--
  40. You can place files in the public directory to get included.
  41. -->
  42. <X-PRE-PROCESS cmd="include" data="public/*.xml"/>
  43. <!--
  44. If you have made it this far lets challenge the caller and if they authenticate
  45. lets try what they dialed in the default context. (commented out by default)
  46. -->
  47. <!--
  48. <extension name="check_auth" continue="true">
  49. <condition field="${sip_authorized}" expression="^true$" break="never">
  50. <anti-action application="respond" data="407"/>
  51. </condition>
  52. </extension>
  53. <extension name="transfer_to_default">
  54. <condition>
  55. <action application="transfer" data="${destination_number} XML default"/>
  56. </condition>
  57. </extension>
  58. -->
  59. </context>
  60. </include>