VoIP Cookbook: Setup BIND for ENUM Server

From OnnoWiki
Jump to navigation Jump to search

For example, we are assigned for +625XXXX. We need to edit,

/etc/bind/named.conf.local

Entry for domain 5.2.6.e164.id

zone "5.2.6.e164.id" IN {
        type master;
        file "/etc/bind/5.2.6.e164.id.db";
};

All subscriber numbers must be listed in /etc/bind/5.2.6.e164.id.db. An example of the DNS file of /etc/bind/5.2.6.e164.id.db is as follows,

$TTL    86400
@	IN SOA  ns.warnet.co.id admin.warnet.co.id. (
			42              ; serial (d. adams)
			3H              ; refresh
			15M             ; retry
			1W              ; expiry
			1D )            ; minimum

            IN NS	ns.warnet.co.id.

0.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2000@192.168.0.3!" .
1.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2001@192.168.0.3!" .
2.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2002@192.168.0.3!" .
3.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2003@192.168.0.3!" .
4.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2004@192.168.0.3!" .
5.0.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2005@192.168.0.3!" .
0.2.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2020@192.168.0.3!" .
1.2.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2021@192.168.0.3!" .
2.2.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2022@192.168.0.3!" .
0.3.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2030@192.168.0.3!" .
1.3.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2031@192.168.0.3!" .
2.3.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2032@192.168.0.3!" .
3.3.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2033@192.168.0.3!" .
0.5.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2050@192.168.0.3!" .
1.5.0.2	NAPTR 10 100 "u" "E2U+sip" "!^.*$!sip:2051@192.168.0.3!" .

For example, it means the mapping numbers is as follows,

+6252000	0.0.0.2.5.2.6.e164.id	2000@192.168.0.3
+6252001	1.0.0.2.5.2.6.e164.id	2001@192.168.0.3
+6252002	2.0.0.2.5.2.6.e164.id	2002@192.168.0.3

After the editing process, please restar the DNS Server using the command

# /etc/init.d/bind9 restart


See Also