[Freeswitch-svn] [commit] r9715 - freeswitch/trunk/conf/dialplan
Freeswitch SVN
brian at freeswitch.org
Sun Sep 28 21:27:54 EDT 2008
Author: brian
Date: Sun Sep 28 21:27:54 2008
New Revision: 9715
Modified:
freeswitch/trunk/conf/dialplan/default.xml
freeswitch/trunk/conf/dialplan/public.xml
Log:
more tweaks and docs
Modified: freeswitch/trunk/conf/dialplan/default.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/default.xml (original)
+++ freeswitch/trunk/conf/dialplan/default.xml Sun Sep 28 21:27:54 2008
@@ -1,3 +1,14 @@
+<!--
+ 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>
@@ -82,7 +93,7 @@
<!-- 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>
@@ -106,9 +117,6 @@
</condition>
</extension>
-
-
-
<extension name="eavesdrop">
<condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
<action application="answer"/>
@@ -350,14 +358,14 @@
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.
@@ -366,11 +374,11 @@
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>
@@ -428,6 +436,11 @@
</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)$">
@@ -440,7 +453,23 @@
</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}">
@@ -454,11 +483,7 @@
<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)}"/>
@@ -475,5 +500,7 @@
</extension>
-->
+ <!-- SEE WARNING ABOVE IF YOU ARE TRYING TO ADD EXTENSIONS HERE! -->
+
</context>
</include>
Modified: freeswitch/trunk/conf/dialplan/public.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/public.xml (original)
+++ freeswitch/trunk/conf/dialplan/public.xml Sun Sep 28 21:27:54 2008
@@ -1,13 +1,18 @@
+<!--
+ 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$">
@@ -15,6 +20,17 @@
</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"/>
@@ -37,7 +53,10 @@
<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>
More information about the Freeswitch-svn
mailing list