[Freeswitch-trunk] [commit] r6932 - freeswitch/trunk/scripts/contrib/trixter/dialplan

Freeswitch SVN trixter at freeswitch.org
Fri Dec 21 00:20:22 EST 2007


Author: trixter
Date: Fri Dec 21 00:20:22 2007
New Revision: 6932

Modified:
   freeswitch/trunk/scripts/contrib/trixter/dialplan/README
   freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nanpa.xml
   freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nl.xml
   freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml

Log:
new format, 1 extension, optional enum now
Dont read the readme, its evil no one should read the readme ever


Modified: freeswitch/trunk/scripts/contrib/trixter/dialplan/README
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/dialplan/README	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/dialplan/README	Fri Dec 21 00:20:22 2007
@@ -76,13 +76,18 @@
 attempt to use a regexp unless it is indicated that it is a regexp.
 
 
+<!--
+TYPE: static
+Whether or not to use enum
+-->
+<variable name="use_enum" value="true"/>
 
 <!--
 TYPE: static
 The name for the gateway to send calls to if ENUM fails
 This name would be defined in your sip profile.
 -->
-<variable name="default_gateway" value="asterlink.com"/>
+<variable name="default_gateway" value="telco.com"/>
 
 
 

Modified: freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nanpa.xml
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nanpa.xml	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nanpa.xml	Fri Dec 21 00:20:22 2007
@@ -1,5 +1,8 @@
 <!-- include this in the USER DIRECTORY variables section -->
 
+<!-- do we use enum? -->
+<variable name="use_enum" value="true"/>
+
 <!-- this is the default gateway to send calls to if enum fails -->
 <variable name="default_gateway" value="asterlink.com"/>
 

Modified: freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nl.xml
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nl.xml	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/dialplan/dialplan.nl.xml	Fri Dec 21 00:20:22 2007
@@ -1,7 +1,10 @@
 <!-- include this in the USER DIRECTORY variables section -->
 
+<!-- do we use enum? -->
+<variable name="use_enum" value="true"/>
+
 <!-- this is the default gateway to send calls to if enum fails -->
-<variable name="default_gateway" value="asterlink.com"/>
+<variable name="default_gateway" value="telco.com"/>
 
 <!-- the country code, only numeric -->
 <variable name="default_country_code" value="31"/>

Modified: freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml	(original)
+++ freeswitch/trunk/scripts/contrib/trixter/dialplan/localized.dialplan.xml	Fri Dec 21 00:20:22 2007
@@ -1,65 +1,70 @@
-<!--
-    This is a fairly generic dialing plan for emergency, local, national and international calling
-    The user is required to have regexps defined as variables, either globals or per user
-
-    VARS:
-    default_gateway                telco.com
-    default_country_code           31
-    default_international_prefix   00 for EU  011 for US
-
-    default_international_regexp   ^${international_prefix}(\d+)$
-    default_domestic_regexp        ^0([1-9\d+)$
-    default_local_regexp           ^([1-9]\d+)$
-    default_emergency_number       ^112$ in EU  ^911$ in NANPA (or looser ^\d11$ to get 611, 411, etc)
-    
--->
-<context name="INT-Numbering-Plan">
-
- <!--
-  For international
- -->
- <extension name="INT-International">
-   <condition field="destination_number" expression="${default_international_regexp}">
-     <action application="set" data="continue_on_fail=true"/>
-     <action application="set" data="hangup_after_bridge=true"/>
-     <action application="enum" data="$1"/>
-     <action application="bridge" data="${enum_auto_route}"/>
-     <action application="bridge" data="sofia/gateway/${default_gateway}/${default_international_prefix}$1"/>
-   </condition>
- </extension>
-
- <!--
-  For in country but out of area
- -->
- <extension name="INT-Domestic_out_of_area">
-   <condition field="destination_number" expression="${default_domestic_regexp}">
-     <action application="set" data="continue_on_fail=true"/>
-     <action application="set" data="hangup_after_bridge=true"/>
-     <action application="enum" data="${default_country_code}$1"/>
-     <action application="bridge" data="${enum_auto_route}"/>
-     <action application="bridge" data="sofia/gateway/${default_gateway}/${default_country_code}$1"/>
-   </condition>
- </extension>
-
- <!--
-     For same city calls
- -->
- <extension name="INT_Local">
-   <condition field="destination_number" expression="${default_local_regexp}">
-     <action application="set" data="continue_on_fail=true"/>
-     <action application="set" data="hangup_after_bridge=true"/>
-     <action application="enum" data="${default_country_code}${default_local_prefix}$1"/>
-     <action application="bridge" data="${enum_auto_route}"/>
-     <action application="bridge" data="sofia/gateway/${default_gateway}/${default_country_code}${default_local_prefix}$1"/>
-   </condition>
- </extension>
-
- <!--
-     Emergency service - verify your provider really supports this
- -->
- <extension name="INT_Emergency_Service">
-   <condition field="destination_number" expression="${default_emergency_number}">
-     <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
-   </condition>
- </extension>
+<context name="default">
+  <extension name="localized-dialplan">
+    <!--
+	Emergency service - verify your provider really supports this
+      -->
+    <condition field="${destination_number}" expression="${default_emergency_number}" continue="true" break="never">
+      <action application="export" data="nolocal:jitterbuffer_msec=180"/>
+      <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/>
+    </condition>
+    <!--
+	For international
+      -->
+    <condition field="${destination_number}" expression="${default_international_regexp}" continue="true" break="never">
+      <action application="set" data="e164number=$1"/>
+    </condition>
+    <!--
+	For in country but out of area
+      -->
+    <condition field="${destination_number}" expression="${default_domestic_regexp}" continue="true" break="never">
+      <action application="set" data="e164number=${default_country_code}$1"/>
+    </condition>
+    <!--
+	For same city calls
+      -->
+    <condition field="${destination_number}" expression="${default_local_regexp}" continue="true" break="never">
+      <action application="set" data="e164number=${default_country_code}${default_local_prefix}$1"/>
+    </condition>
+
+    <!--
+	Dial the call
+      -->
+    <!--    <condition field="${e164number}" expression="^\d+$" continue="true"> -->
+    <condition>
+      <action application="info"/>
+      <action application="export" data="nolocal:jitterbuffer_msec=180"/>
+      <action application="set" data="continue_on_fail=true"/>
+      <action application="set" data="hangup_after_bridge=true"/>
+      <action application="set" data="call_timeout=45"/>
+      <action application="set" data="hangup_after_bridge=true"/>
+      <action application="set" data="continue_on_fail=true"/>
+    </condition>
+    <condition field="${use_enum}" expression="^yes$" continue="true" break="never">
+      <action application="enum" data="${e164number}"/>
+      <action application="bridge" data="${enum_auto_route}"/>
+    </condition>
+    <condition>
+      <action application="bridge" data="sofia/gateway/${default_gateway}/${e164number}"/>
+    </condition>
+  </extension>
+
+  <extension name="callreturn">
+    <condition field="${destination_number}" expression="^\*69$|^869$">
+      <action application="transfer" data="${db(select/call_return/ata)}"/>
+    </condition>
+  </extension>
+
+  <extension name="echo">
+    <condition field="${destination_number}" expression="^\*\d+$">
+      <action application="echo"/>
+    </condition>
+  </extension>
+
+  <extension name="callme">
+    <condition>
+      <action application="db" data="insert/call_return/ata/${caller_id_number}"/>
+      <action application="bridge" data="${sofia_contact(ata at 192.168.5.100)}"/>
+    </condition>
+  </extension>
+  
 </context>



More information about the Freeswitch-trunk mailing list