2008-09-28 21:27:54 -04:00
|
|
|
<!--
|
|
|
|
NOTICE:
|
|
|
|
|
|
|
|
This context is usually accessed via the external sip profile sitting on port 5080.
|
|
|
|
|
|
|
|
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">
|
2008-10-17 04:26:55 -04: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"/>
|
|
|
|
</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>
|
|
|
|
|
2008-09-29 15:02:42 -04:00
|
|
|
<!-- Try to get domain_name from the sip_req_params variable -->
|
2008-09-28 19:00:04 -04:00
|
|
|
<extension name="set_domain" continue="true">
|
2008-10-10 15:28:41 -04:00
|
|
|
<condition field="${domain_name}" expression="^$"/>
|
|
|
|
<condition field="source" expression="mod_sofia"/>
|
|
|
|
<condition field="${sip_req_params}" expression="domain_name=([A-Z-a-z0-9.]+)">
|
2008-09-28 19:36:22 -04:00
|
|
|
<!-- We need to export this so the B-Leg will have it after transfer too. -->
|
2008-09-29 15:02:42 -04:00
|
|
|
<action application="export" data="domain_name=$1"/>
|
2008-10-09 13:53:21 -04:00
|
|
|
<anti-action application="export" data="domain_name=${sip_req_host}"/>
|
2008-09-28 19:00:04 -04:00
|
|
|
</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>
|