ENUM, as defined by the IETF, is a convenient and powerful way to map telephone numbers to the latest communications technologies such as SIP, XMPP (Jabber) and web sites.

ENUM resolution operates much like reverse DNS lookup:

  • Take the number you want to call and normalize it into E.164 format - in other words, by removing any leading zero and punctuation and adding the country code. For example, for a British number "020 7123 4567", the country code is 44 and so the normalized form of the number is +442071234567
  • Remove the leading plus symbol, reverse the digits and insert a dot between each digit. For our sample number +442071234567, it becomes
  • Choose the ENUM suffix. The official ENUM tree defined by the IETF uses the e164.arpa ENUM suffix. There are several third-party suffixes as well, such as e164.org and for the sip5060.net service, use the suffix e164-addr.sip5060.net. For our example, the full string, with suffix, is
  • Perform a DNS lookup, typically looking for NAPTR records

Here is an example using dig. The subject number we are looking up is 01865 332244 from the Nominet contact page:

$ dig -t naptr ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> -t naptr ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49821 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 4 ;; QUESTION SECTION: ; IN NAPTR ;; ANSWER SECTION: 86400 IN NAPTR 100 20 "u" "E2U+pstn:tel" "!^(.*)$!tel:\\1!" . 86400 IN NAPTR 100 10 "u" "E2U+sip" "!^\\+441865332(.*)$!sip:\\1@nominet.org.uk!" .