[nona.net home]
not logged inlog in
> home> articles> VoIP&ENUM> E.164 to ENUM
my account
not logged in
from E.164 to e164.arpa

converting E.164 numbers into ENUM domain names

Overview ::
ENUM associates internet resources (more precise, internet addresses - URI's) with phone numbers. At first glance, that does not seem to make any sense, but it turns out to be very useful for technologies like Voice over IP, where internet and PSTN are working together. Since phone numbers and internet domain names have a completely different structure, some kind of translation between them is required.
converting from E.164 to ENUM ::
Converting E.164 phone numbers into ENUM domains involves the following steps:
  1. Start with the full E.164 number, including country and area code
  2. Remove all characters except digits
  3. Reverse digit order
  4. Put dots between each digit
  5. add the suffix ".e164.arpa" - result is the ENUM domain corresponding to the phone number
Example (using "+43 59966/366366" as E.164 number, where "+43" is the country code for Austria, "59966" is the area code, and "366366" is the subscriber number):
  1. +43 59966/366366
  2. 4359966366366
  3. 6636636699534
example code using PHP ::
The code below is an example implementation of the ENUM conversion - implemented as a user defined function using PHP
function e164_to_enum ($e164) {
   $work = preg_replace("/[^0-9]/", "", $e164); // remove cruft
   for ($i = strlen($work)-1; $i >= 0; $i--) { 
      $enum_domain .= ".".substr($work, $i, 1); // reverse, dots
   $enum_domain = substr($enum_domain, 1); // remove lead dot
   $enum_domain .= ".e164.arpa"; // append suffix
   return ($enum_domain); // return ENUM domain
ENUM lookup
Enter phone number: