The OpenTelecoms.org LDAP ENUM module for bind9 is based on the dlz_dlopen API

The module has been used commercially and is now available to the open source community

Download / Getting the source code

Please see the OpenTelecoms.org dlz-ldap-enum page on Github

How it works

Let's say you have your people in LDAP already, with telephoneNumber and mail attributes defined:

dn: cn=Alice,dc=example,dc=org objectClass: inetOrgPerson cn: Alice mail: alice@example.org telephoneNumber: +44207135

Now, just install dlz-ldap-enum as per the README instructions, and then you can query any phone number via DNS, and get back the SIP and Jabber addresses in NAPTR records:

$ dig @localhost -t any 5.3.1.7.0.2.4.4.e164-rev.test ;; ANSWER SECTION: 5.3.1.7.0.2.4.4.e164-rev.test. 60 IN NAPTR 100 10 "u" "E2U+sip" "!^\\+44207135$!sip:alice@example.org!" . 5.3.1.7.0.2.4.4.e164-rev.test. 60 IN NAPTR 100 10 "u" "E2U+xmpp" "!^\\+44207135$!xmpp:alice@example.org!" .

Using ENUM queries, all the VoIP software on your network can now use your LDAP database as a call routing database. You could literally rip out your old phone system, tear up the expensive maintenance contracts and run the whole enterprise on OpenLDAP, a SIP proxy, wifi and Lumicall.