+<!--
+ NOTICE:
+
+ This context is usually accessed via authenticated or transfered callers from the public context
+ from the sip profile sitting on port 5060.
+
+ Authenitcated users will use the user_context variable on the user to determin what context
+ they can access. You can also add a user in the directory with the cidr= attribute acl.conf.xml
+ will build the domains acl using this value.
+-->
+
<?xml version="1.0" encoding="utf-8"?>
<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
<include>
<!-- If to_host and from_host differ this is an external sip URI so lets send it out. -->
<extension name="external_sip_uri" continue="true">
<condition field="source" expression="mod_sofia"/>
- <condition field="${outside_call}" expression="^$"/>
+ <condition field="${outside_call}"a expression="^$"/>
<condition field="${sip_req_host}" expression="${sip_from_host}">
<anti-action application="bridge" data="sofia/${use_profile}/${sip_to_uri}"/>
</condition>
</condition>
</extension>
-
-
-
<extension name="eavesdrop">
<condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
<action application="answer"/>
is to use phone's star codes (defaults to *38 and *39).
-->
<extension name="park">
- <condition field="source" expression="mod_sofia"/>
+ <condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="callpark"/>
- <condition field="${sip_refer_to}">
- <expression><![CDATA[<sip:callpark@${domain};orbit=(\d+)>]]></expression>
- <action application="fifo" data="$1@${domain} in undef $${hold_music}"/>
- </condition>
+ <condition field="${sip_refer_to}">
+ <expression><![CDATA[<sip:callpark@${domain};orbit=(\d+)>]]></expression>
+ <action application="fifo" data="$1@${domain} in undef $${hold_music}"/>
+ </condition>
</extension>
-
+
<!--
This extension is used with linksys phones.
and we extract that info.
-->
<extension name="unpark">
- <condition field="source" expression="mod_sofia"/>
+ <condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="pickup"/>
- <condition field="${sip_to_params}" expression="orbit\=(\d+)">
- <action application="answer"/>
- <action application="fifo" data="$1@${domain} out nowait"/>
+ <condition field="${sip_to_params}" expression="orbit\=(\d+)">
+ <action application="answer"/>
+ <action application="fifo" data="$1@${domain} out nowait"/>
</condition>
</extension>
</condition>
</extension>
+ <!--
+ You will no longer hear the bong tone. The wav file is playing stating the call is secure.
+ The file will not play unless you have both TLS and SRTP active.
+ -->
+
<extension name="hold_music">
<condition field="destination_number" expression="^9999$"/>
<condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
</condition>
</extension>
+ <!--
+ You can place files in the default directory to get included.
+ -->
<X-PRE-PROCESS cmd="include" data="default/*.xml"/>
+
+ <!--
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+ Anything you put below this line will usually get ignored to to the file in
+ default/99999_enum.xml as it will transfer the call to the enum dialplan.
+
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ -->
+
+ <!--
+ This is an example of how to overide the RURI on an outgoing invite to a registered contact.
+ -->
<!--
<extension name="refer">
<condition field="${sip_refer_to}">
<action application="bridge" data="sofia/${use_profile}/${refer_user}@${refer_domain}"/>
</condition>
</extension>
- -->
- <!--
- This is an example of how to overide the RURI on an outgoing invite to a registered contact.
- -->
- <!--
+
<extension name="ruri">
<condition field="destination_number" expression="^ruri$">
<action application="bridge" data="sofia/${ruri_profile}/${ruri_user}${regex(${sofia_contact(${ruri_contact})}|^[^\@]+(.*)|%1)}"/>
</extension>
-->
+ <!-- SEE WARNING ABOVE IF YOU ARE TRYING TO ADD EXTENSIONS HERE! -->
+
</context>
</include>
+<!--
+ 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.
+-->
+
<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
<include>
<context name="public">
- <extension name="outside_call" continue="true">
- <condition break="never">
- <action application="set" data="outside_call=true"/>
- </condition>
- </extension>
-
<extension name="unloop">
<condition field="${unroll_loops}" expression="^true$"/>
<condition field="${sip_looped_call}" expression="^true$">
</condition>
</extension>
+ <!--
+ 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>
+
<!-- Try to get target_domain from the sip_req_params variable -->
<extension name="set_domain" continue="true">
<condition field="${target_domain}" expression="^$" break="never"/>
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
-
+
+ <!--
+ You can place files in the public directory to get included.
+ -->
<X-PRE-PROCESS cmd="include" data="public/*.xml"/>
</context>