ENUM
From Pbxnsip Wiki
Purpose
ENUM (see for example http://en.wikipedia.org/wiki/ENUM) is used to locate a service in the Internet by using a telephone number. Typically, this service is voice communication.
There are several ENUM trees available in the Internet. Several countries started ENUM trials with numbers that are publicly available. Therefore, is makes sense to be able to use different ENUM trees apart from the official e164.arpa tree.
The PBX supports ENUM by adding a special flag when resolving a SIP URI. If the parameter "enum" is set to "true" while routing a packet, the PBX will apply the RFC 2916 algorithm to the packet.
Setup
First, you need a trunk that is used for routing ENUM requests. This trunk should be a gateway trunk with no outbound proxy set. You may use other features like trunk failover as you like.
In order to use this trunk, you need to make a entry into the dial plan. This dial plan must insert the enum parameter in the replacement URI. The domain name of the URI will be used for the ENUM root location. For example, you can use the string "sip:\1@e164.org;enum=true" in the replacement field. It will use the root domain "e164.org".
Example
In this example, you can see the log messages when dialling a number on an ENUM trunk:
[5] 2006/10/10 11:25:37: Dialplan: Match 9420222745121@localhost to <sip:420222745121@e164.arpa;enum=true> on trunk ENUM [8] 2006/10/10 11:25:37: Converting phone 420222745121 into 1.2.1.5.4.7.2.2.2.0.2.4.e164.arpa [8] 2006/10/10 11:25:37: Resolve destination 414: enum 1.2.1.5.4.7.2.2.2.0.2.4.e164.arpa [8] 2006/10/10 11:25:37: DNS: Add dns_naptr 1.2.1.5.4.7.2.2.2.0.2.4.e164.arpa 100 50 u E2U+sip !^.*$!sip:echo@nic.cz! (ttl=3600) [8] 2006/10/10 11:25:37: Resolve destination 414: enum 1.2.1.5.4.7.2.2.2.0.2.4.e164.arpa [8] 2006/10/10 11:25:37: Resolve destination 414: url sip:echo@nic.cz [8] 2006/10/10 11:25:37: Resolve destination 414: naptr nic.cz [8] 2006/10/10 11:25:37: DNS: Add dns_naptr nic.cz (ttl=3600) [8] 2006/10/10 11:25:37: Resolve destination 414: naptr nic.cz [8] 2006/10/10 11:25:37: Resolve destination 414: srv tls _sips._tcp.nic.cz [8] 2006/10/10 11:25:38: DNS: Add dns_srv _sips._tcp.nic.cz (ttl=3600) [8] 2006/10/10 11:25:38: Resolve destination 414: srv tls _sips._tcp.nic.cz [8] 2006/10/10 11:25:38: Resolve destination 414: srv tcp _sip._tcp.nic.cz [8] 2006/10/10 11:25:38: DNS: Add dns_srv _sip._tcp.nic.cz (ttl=3600) [8] 2006/10/10 11:25:38: Resolve destination 414: srv tcp _sip._tcp.nic.cz [8] 2006/10/10 11:25:38: Resolve destination 414: srv udp _sip._udp.nic.cz [8] 2006/10/10 11:25:38: DNS: Add dns_srv _sip._udp.nic.cz 100 100 sip.nic.cz 5060 (ttl=1800) [8] 2006/10/10 11:25:38: Resolve destination 414: srv udp _sip._udp.nic.cz [8] 2006/10/10 11:25:38: Resolve destination 414: a udp sip.nic.cz 5060 [8] 2006/10/10 11:25:38: DNS: Add dns_a sip.nic.cz 217.31.204.193 (ttl=1800) [8] 2006/10/10 11:25:38: Resolve destination 414: a udp sip.nic.cz 5060 [8] 2006/10/10 11:25:38: Resolve destination 414: udp 217.31.204.193 5060 [8] 2006/10/10 11:25:38: Send Packet INVITE [6] 2006/10/10 11:25:38: SIP Tx udp:217.31.204.193:5060:


