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">
|
|
|
|
<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">
|
|
|
|
<condition break="never">
|
|
|
|
<action application="set" data="outside_call=true"/>
|
|
|
|
</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-09-29 15:02:42 -04:00
|
|
|
<condition field="${domain_name}" expression="^$" break="never"/>
|
2008-09-28 19:00:04 -04:00
|
|
|
<condition field="source" expression="mod_sofia" break="never"/>
|
2008-09-29 15:02:42 -04:00
|
|
|
<condition field="${sip_req_params}" expression="domain_name=([A-Z-a-z0-9.]+)" break="never">
|
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"/>
|
|
|
|
<anti-action application="export" data="domain_name=$${domain}"/>
|
2008-09-28 19:00:04 -04:00
|
|
|
</condition>
|
|
|
|
</extension>
|
|
|
|
|
2008-09-28 19:36:22 -04:00
|
|
|
<extension name="call_debug" continue="true">
|
2008-09-28 19:00:04 -04:00
|
|
|
<condition field="${call_debug}" expression="^true$" break="never">
|
|
|
|
<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"/>
|
2007-12-08 14:03:12 -05:00
|
|
|
|
|
|
|
</context>
|
|
|
|
</include>
|