Difference between revisions of "ENUM"
From FusionPBX
(→Enum Dialplan) |
(→Enum Dialplan) |
||
Line 15: | Line 15: | ||
<condition field="destination_number" expression="^(\d{7})$"> | <condition field="destination_number" expression="^(\d{7})$"> | ||
<action application "log" data="INFO Checking 7-dig Enum"/> | <action application "log" data="INFO Checking 7-dig Enum"/> | ||
− | <action application="set" data="continue_on_fail=true"/> | + | <action application="set" data="call_direction=outbound" /> |
+ | <action application="set" data="continue_on_fail=true" /> | ||
+ | <action application="set" data="hangup_after_bridge=true" /> | ||
<action application="enum" data="1YOUR_AREA_CODE$1 e164.org"/> | <action application="enum" data="1YOUR_AREA_CODE$1 e164.org"/> | ||
<action application="bridge" data="${enum_auto_route}"/> | <action application="bridge" data="${enum_auto_route}"/> | ||
Line 24: | Line 26: | ||
<condition field="destination_number" expression="^(\d{10})$"> | <condition field="destination_number" expression="^(\d{10})$"> | ||
<action application "log" data="INFO Checking 10-dig Enum"/> | <action application "log" data="INFO Checking 10-dig Enum"/> | ||
− | <action application="set" data="continue_on_fail=true"/> | + | <action application="set" data="call_direction=outbound" /> |
+ | <action application="set" data="continue_on_fail=true" /> | ||
+ | <action application="set" data="hangup_after_bridge=true" /> | ||
<action application="enum" data="1$1 e164.org"/> | <action application="enum" data="1$1 e164.org"/> | ||
<action application="bridge" data="${enum_auto_route}"/> | <action application="bridge" data="${enum_auto_route}"/> | ||
Line 33: | Line 37: | ||
<condition field="destination_number" expression="^(\d{11})$"> | <condition field="destination_number" expression="^(\d{11})$"> | ||
<action application "log" data="INFO Checking 11-dig Enum"/> | <action application "log" data="INFO Checking 11-dig Enum"/> | ||
− | <action application="set" data="continue_on_fail=true"/> | + | <action application="set" data="call_direction=outbound" /> |
+ | <action application="set" data="continue_on_fail=true" /> | ||
+ | <action application="set" data="hangup_after_bridge=true" /> | ||
<action application="enum" data="$1 e164.org"/> | <action application="enum" data="$1 e164.org"/> | ||
<action application="bridge" data="${enum_auto_route}"/> | <action application="bridge" data="${enum_auto_route}"/> | ||
Line 42: | Line 48: | ||
<condition field="destination_number" expression="^(011.*)$"> | <condition field="destination_number" expression="^(011.*)$"> | ||
<action application "log" data="INFO Checking 15-dig Enum"/> | <action application "log" data="INFO Checking 15-dig Enum"/> | ||
+ | <action application="set" data="call_direction=outbound" /> | ||
+ | <action application="set" data="continue_on_fail=true" /> | ||
+ | <action application="set" data="hangup_after_bridge=true" /> | ||
<action application="set" data="continue_on_fail=true"/> | <action application="set" data="continue_on_fail=true"/> | ||
<action application="enum" data="$1 e164.org"/> | <action application="enum" data="$1 e164.org"/> |
Revision as of 18:47, 13 May 2011
This is really pretty easy to set up.
Fix enum.conf.xml
vim /usr/local/freeswitch/conf/autoload_configs/enum.conf.xml
Find:
<route service="E2U+SIP" regex="sip:(.*)" replace="sofia/${use_profile}/$1"/>
Change it to:
<route service="E2U+SIP" regex="sip:(.*)" replace="sofia/internal/$1"/>
Enum Dialplan
Make sure to change YOUR_AREA_CODE
vim /usr/local/freeswitch/conf/dialplan/default/00000_enum.xml
<extension name="7e164.org" continue="true"> <condition field="destination_number" expression="^(\d{7})$"> <action application "log" data="INFO Checking 7-dig Enum"/> <action application="set" data="call_direction=outbound" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="enum" data="1YOUR_AREA_CODE$1 e164.org"/> <action application="bridge" data="${enum_auto_route}"/> </condition> </extension> <extension name="10e164.org" continue="true"> <condition field="destination_number" expression="^(\d{10})$"> <action application "log" data="INFO Checking 10-dig Enum"/> <action application="set" data="call_direction=outbound" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="enum" data="1$1 e164.org"/> <action application="bridge" data="${enum_auto_route}"/> </condition> </extension> <extension name="11e164.org" continue="true"> <condition field="destination_number" expression="^(\d{11})$"> <action application "log" data="INFO Checking 11-dig Enum"/> <action application="set" data="call_direction=outbound" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="enum" data="$1 e164.org"/> <action application="bridge" data="${enum_auto_route}"/> </condition> </extension> <extension name="15e164.org" continue="true"> <condition field="destination_number" expression="^(011.*)$"> <action application "log" data="INFO Checking 15-dig Enum"/> <action application="set" data="call_direction=outbound" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="set" data="continue_on_fail=true"/> <action application="enum" data="$1 e164.org"/> <action application="bridge" data="${enum_auto_route}"/> </condition> </extension>
e164.org
Go to e164.org and register your DID's so the rest of us can call you for free :)