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