Publishing ENUM data

Setting up ENUM as part of your RTC deployment, in the public ENUM tree, an internal ENUM tree or both, are optional steps that provides more flexibility and resilience for routing calls.

Public ENUM

In various countries, it is possible to have your phone numbers registered in the public ENUM tree for e164.arpa. Wikipedia maintains a detailed list of national ENUM registries.

Private and third-party ENUM suffixes

Even if your country does not have a national ENUM scheme yet, many large organizations are operating an internal ENUM service. If you have a domain name server, you can create NAPTR records in the zone files just as easily as creating an A or CNAME record. It is relatively easy to construct a script using Python or Java to read from a company telephone directory and write a zone file for the name server. The file can be regenerated periodically by a cron job.

If your phone numbers are available in a local LDAP server, the dlz-ldap-enum module can be used in a Bind9 DNS name server to support real-time queries.

Dynamic ENUM from LDAP with dlz-ldap-enum

Installation

Install the package using the appropriate tool, as demonstrated in Example 15.2, “Installing dlz-ldap-enum on Debian/Ubuntu” and Example 15.3, “Install dlz-ldap-enum on Fedora/RHEL/CentOS”.

Example 15.2. Installing dlz-ldap-enum on Debian/Ubuntu

$ sudo apt-get install dlz-ldap-enum

Example 15.3. Install dlz-ldap-enum on Fedora/RHEL/CentOS

$ sudo yum install dlz-ldap-enum

Configuration

The configuration file is dlz_ldap_enum.conf. On a Debian/Ubuntu system, it can be found in /etc/bind while Fedora/RHEL/CentOS users will find it in /etc/named.

The first step is to customize the file to specify the exact location of the plugin, the ENUM DNS suffix and your LDAP server connection parameters, as demonstrated in Example 15.4, “Sample dlz_ldap_enum.conf.

Example 15.4. Sample dlz_ldap_enum.conf

dlz "example" {
    database "dlopen /usr/lib/dlz-ldap-enum/dlz_ldap_enum.so 2
        v3 simple {cn=admin,dc=example,dc=org} {secret} {127.0.0.1}
        e164-addr.example.org
        {localhost. root.example.org. 2 604800 86400 2419200 604800}
        localhost
        60
        ldap:///ou=$zone$,dc=example,dc=org???objectclass=top
        ldap:///dc=example,dc=org?mail?sub?telephoneNumber=$record$";
};

Now add a reference to this file into the main named.conf, which may be under /etc/bind or just /etc depending upon your system. This is demonstrated in Example 15.5, “Additions to named.conf for Debian/Ubuntu” and Example 15.6, “Additions to named.conf for Fedora/RHEL/CentOS”.

Example 15.5. Additions to named.conf for Debian/Ubuntu

include "/etc/bind/dlz_ldap_enum.conf";

Example 15.6. Additions to named.conf for Fedora/RHEL/CentOS

include "/etc/named/dlz_ldap_enum.conf";