Difference between revisions of "ENUM"

From FusionPBX
Jump to: navigation, search
Line 1: Line 1:
 
This is really pretty easy to set up. A very large benefit of VoIP that everyone talks about is saving money. That's where 'ENUM 164' (also know as enum and e164) comes into the picture. ENUM is a method that stores numbers within the Internet's DNS. www.E164.org allows Voice over IP systems to place and receive telephone calls over the Internet, without using public switched telephone network (PSTN). When you AND the person you are calling use ENUM, you don't have to use PSTN. When you don't use PSTN, you don't have to pay your gateway provider. So, ENUM = Free calling!  
 
This is really pretty easy to set up. A very large benefit of VoIP that everyone talks about is saving money. That's where 'ENUM 164' (also know as enum and e164) comes into the picture. ENUM is a method that stores numbers within the Internet's DNS. www.E164.org allows Voice over IP systems to place and receive telephone calls over the Internet, without using public switched telephone network (PSTN). When you AND the person you are calling use ENUM, you don't have to use PSTN. When you don't use PSTN, you don't have to pay your gateway provider. So, ENUM = Free calling!  
  
Once you register your DID with enum there are some really nice benefits, for example:
+
Once you AND the person you are calling have registered your DIDs with ENUM there are some really nice benefits, for example:
 +
*Free calling
 
*If both sides support g722, then callers get twice the audio quality
 
*If both sides support g722, then callers get twice the audio quality
*if both sides support h263 or h264, callers could even make video calls
+
*If both sides support h263 or h264, callers could even make video calls
  
 
please add to this wiki if you have discovered anything cool or useful that was not discussed in the wiki*
 
please add to this wiki if you have discovered anything cool or useful that was not discussed in the wiki*

Revision as of 19:24, 26 July 2011

This is really pretty easy to set up. A very large benefit of VoIP that everyone talks about is saving money. That's where 'ENUM 164' (also know as enum and e164) comes into the picture. ENUM is a method that stores numbers within the Internet's DNS. www.E164.org allows Voice over IP systems to place and receive telephone calls over the Internet, without using public switched telephone network (PSTN). When you AND the person you are calling use ENUM, you don't have to use PSTN. When you don't use PSTN, you don't have to pay your gateway provider. So, ENUM = Free calling!

Once you AND the person you are calling have registered your DIDs with ENUM there are some really nice benefits, for example:

  • Free calling
  • If both sides support g722, then callers get twice the audio quality
  • If both sides support h263 or h264, callers could even make video calls

please add to this wiki if you have discovered anything cool or useful that was not discussed in the wiki*

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

Option 1: Add Outbound Route

On the latest version of FusionPBX you can use the Outbound Route add tool to try Enum before sending the call to your Gateway. For the first 'Gateway' select 'enum' and the 'Alternate gateway choose your regular Gateway. This will try enum first and if the call fails to bridge with enum it will send your call to your regular gateway.

Option 2: 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="effective_caller_id_name=${outbound_caller_id_name}" />
       <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}" />
       <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="effective_caller_id_name=${outbound_caller_id_name}" />
       <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}" />
       <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="effective_caller_id_name=${outbound_caller_id_name}" />
       <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}" />
       <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="effective_caller_id_name=${outbound_caller_id_name}" />
       <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}" />
       <action application="set" data="hangup_after_bridge=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 :)

When adding your DID to enum you will be asked to provide the Protocol and Hostname. If your domain was voip.example.com then you would add the following:

Protocol: SIP

Hostname: voip.example.com:5080

After adding this information you will receive a test call with numbers that are used to validate the information you provided. When completed you should see 'status: active'