ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to create ENUM Records - Creating Naptr Records

Updated on November 24, 2009
Use ENUM and avoid the PSTN costs, pic
Use ENUM and avoid the PSTN costs, pic

Creating EUM records in Bind9

This walkthrough is aimed at people who already have a DNS server running and ready to host dns records for enum. Once ENUM records can be created they can be used by Asterisk PBX by using the enumlookup function.

For a quick tutorial on how to setup a Primary DNS server in Ubuntu Try This.

When creating ENUM / NAPTR records (Naming Authority Pointer)

It is recommended that each enum number is given its own individual zone file (RFC 3761)

The enum zone records follow the format

-         Take your existing phone number e.g 98987999

-         Reverse number 99978989

-         Separate each Number ,

-         Add the domain name onto the end of the number (e.g


All enum records are created using Bind9, I may go through how to create them on PDNS at a later time.

Referencing ENUM records

To keep the ENUM records and information separate from other bind9 dns information the following line was added to named.conf

include "/etc/bind/named.conf.enum";

All enum information for the your enum domain will be referenced inside named.conf.enum in the following way

zone "" {

type master;

file "/etc/bind/";


NAPTR Record Format

Creating ENUM / NAPTR Records

The enum naptr dns records were created according the RFC 2915 The Naming Authority Pointer (NAPTR) Dns Resource Records. The basic format of a NAPTR record is

IN NAPTR 100 10 "u" "sip+E2U" "!^.*$!!"

The naptr records consists of

Order: Order in which NAPTR records will be retrieved when there are multiple naptr records for a domain you can specify in which order they should be accessed. For example

100 10 – First Preference

100 11 – Second Preference

specifies the order in which NAPTR records with equal "order" values SHOULD be processed, low numbers being processed before high numbers.

Flags: At this time only four flags, "S", "A", "U", and "P", are defined. The "S", "A" and "U" flags denote a terminal lookup. This means that this NAPTR record is the last one and that the flag determines what the next stage should be. The "S" flag means that the next lookup should be for SRV records

Service / Protocol: Specifies protocol e.g HTTP, SIP+E2U. 'E2U+sip' to designate that a SIP address-of-record appears in the URI field of a NAPTR record. NAPTR records can be used to store a variety of different information relating to the enum number including landline numbers, mobile numbers, website addresses, emails, faxes etc.

SIP URI: The SIP URI to lookup or dial , specifies the SIP users extension or SIP alias at there designated Telecommunications Service Providers (TSP). A number of substitution characters surround the sip uri as specified by rfc2915.


Example of enum record

use this basic format when creating your NAPTR records
use this basic format when creating your NAPTR records

Testing ENUM / NAPTR records

Once individual NAPTR records have been created inside the enum zone files they can be tested through Linux using the DIG lookup tool.

Dig –t NAPTR

A successful Dig returns



;; ANSWER SECTION: 1800 IN NAPTR 5 20 "U" "E2U+web:http" "!^.*$!!" . 1800 IN NAPTR 10 10 "U" "E2U+tel" "!^.*$!tel:+432xxxxxx!" . 1800 IN NAPTR 5 10 "u" "sip+E2U" "!^.*$!sip:1000@!" . 1800 IN NAPTR 5 15 "U" "E2U+email:mailto" "!^.*$!mailto:pabx@SaIPHOST!" .


And there you have it how to create ENUM NAPTR records, I may make a hub in the future showing how to set it up with Asterisk , doing enumlookup's etc.


    0 of 8192 characters used
    Post Comment
    • expectus profile imageAUTHOR


      10 years ago from Land Downunder

      thanks motricio, I think your a bit more mathematical than me I'm just doing simple electronic number mapping but I know enumeration can be used for encryption methods.

    • motricio profile image

      Mauricio Rodriguez 

      10 years ago from Bogota DC, Colombia

      Excellent job.

      I was looking for a simple encryption method that could be applied as a new security layer on a new system.

      Now I know about ENUM and its process for encoding and decoding.

      We add complexity to the encryption process adding more algorithmic separations for encoding, in result you'll get a stronger encryption.

    • expectus profile imageAUTHOR


      10 years ago from Land Downunder

      thanks don :) we'll probably all be using this type of service in the future without knowing it

    • dusanotes profile image


      10 years ago from Windermere, FL

      Thanks for the Hub, Expectus. It was so far above my brain that I don't know what I learned. But I know you know what you're talking about. Thanks for giving it to us. Don White


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)