forked from Mirrors/freeswitch
stuff for localized dialplans (need to add other areas)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6204 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4663a4dd59
commit
b7b686ec4b
59
conf/dialplan/US.conf.xml
Normal file
59
conf/dialplan/US.conf.xml
Normal file
@ -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>
|
@ -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
|
||||
|
@ -67,6 +67,12 @@
|
||||
<!--<param name="vm-mailto" value="me@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 -->
|
||||
|
Loading…
Reference in New Issue
Block a user