freeswitch/conf/dialplan/US.conf.xml
Brian West e2028b7bf6 fix, thanks trixter
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6847 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-12-18 00:31:11 +00:00

60 lines
2.4 KiB
XML

<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>