[Freeswitch-svn] [commit] r6204 - in freeswitch/trunk/conf: dialplan directory
Freeswitch SVN
intralanman at freeswitch.org
Fri Nov 9 13:46:29 EST 2007
Author: intralanman
Date: Fri Nov 9 13:46:29 2007
New Revision: 6204
Added:
freeswitch/trunk/conf/dialplan/US.conf.xml
Modified:
freeswitch/trunk/conf/dialplan/default.xml
freeswitch/trunk/conf/directory/default.xml
Log:
stuff for localized dialplans (need to add other areas)
Added: freeswitch/trunk/conf/dialplan/US.conf.xml
==============================================================================
--- (empty file)
+++ freeswitch/trunk/conf/dialplan/US.conf.xml Fri Nov 9 13:46:29 2007
@@ -0,0 +1,59 @@
+<context name="US-Numbering-Plan">
+
+ <!--
+ If the destination starts with 011, then check enum and route the call accordingly
+ -->
+ <extension name="US_International">
+ <condition field="destination_number" expression="^011(\d*)$">
+ <action application="set" data="continue_on_fail=true"/>
+ <action application="set" data="hangup_after_bridge=true"/>
+ <action application="enum" data="1$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
+ <action application="bridge" data="sofia/gateway/$${default_gateway}/011$1"/>
+ </condition>
+ </extension>
+
+ <!--
+ If the destination is a 10 or 11 digit US-Style number, then check enum and route accordingly
+ -->
+ <extension name="US_LD">
+ <condition field="destination_number" expression="^1?([2-9]\d{2}[2-9]\d{6})$">
+ <action application="set" data="continue_on_fail=true"/>
+ <action application="set" data="hangup_after_bridge=true"/>
+ <action application="enum" data="1$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
+ <action application="bridge" data="sofia/gateway/$${default_gateway}/1$1"/>
+ </condition>
+ </extension>
+
+ <!--
+ Check for the existence of a default area code.... If found and the destination was dialed
+ as 7 digits prefix a 1 and the default area code to the dialstring, then check enum,
+ then (you guessed it) route accordingly
+ -->
+ <extension name="US_Local">
+ <condition field="${default_area_code}" expression="\d{3}" continue="on-true">
+ <anti-action application="say" data="you must dial the area code to call this destination"/>
+ </condition>
+ <condition field="destination_number" expression="^([2-9]\d{6})$">
+ <action application="set" data="continue_on_fail=true"/>
+ <action application="set" data="hangup_after_bridge=true"/>
+ <action application="enum" data="1$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
+ <action application="bridge" data="sofia/gateway/$${default_gateway}/1${default_area_code}$1"/>
+ </condition>
+ </extension>
+
+ <!--
+ If the number dialed was
+ 411 (Directory Services),
+ 611 (Pretty Standard for Provider Customer Service),
+ 811 (call before you dig i think?),
+ or 911 (Emergency Services) then send directly out the default profile
+ -->
+ <extension name="FCC_Services">
+ <condition field="^([4689]11)$">
+ <action application="bridge" data="sofia/gateway/$${default_gateway}/$1"/>
+ </condition>
+ </extension>
+</context>
Modified: freeswitch/trunk/conf/dialplan/default.xml
==============================================================================
--- freeswitch/trunk/conf/dialplan/default.xml (original)
+++ freeswitch/trunk/conf/dialplan/default.xml Fri Nov 9 13:46:29 2007
@@ -94,6 +94,15 @@
</condition>
</extension>
+ <extension name="Localized_Dialplan">
+ <condition field="${numbering_plan}" expression="^[[:alnum:]]+$"/>
+ <condition field="destination_number" expression="^([[:alnum:]]+)$">
+ <action application="transfer" data="$1 XML ${numbering_plan}-Numbering-Plan"/>
+ </condition>
+ </extension>
+
+
+
<!--
this is a "catchall" extension that will match anything that's
unmatched thus far.... uncomment and reloadxml to activate it
Modified: freeswitch/trunk/conf/directory/default.xml
==============================================================================
--- freeswitch/trunk/conf/directory/default.xml (original)
+++ freeswitch/trunk/conf/directory/default.xml Fri Nov 9 13:46:29 2007
@@ -67,6 +67,12 @@
<!--<param name="vm-mailto" value="me at mydomain.com"/>-->
<!--<param name="vm-email-all-messages" value="true"/>-->
</params>
+ <variables>
+ <variable name="numbering_plan" value="US"/>
+ <variable name="default_area_code" value="434"/>
+ <variable name="max_calls" value="2"/>
+ <variable name="presence_id" value="1001@$${domain}"/>
+ </variables>
</user>
<!-- authless users and mailboxes -->
More information about the Freeswitch-svn
mailing list