FAQ

For the integration of the service in Asterisk, a ENUMLOOKUP function is provided, which performs the ENUM query.

You can change your dialplan in extensions.conf. Example:

[cnum]
; CNUM processing - external line
;
exten => _011.,1,Set(NUMBER=${EXTEN:3})
exten => _011.,n,Log(DEBUG, "Lookup for ${NUMBER}")
exten => _011.,n,Set(ROUTE=${ENUMLOOKUP(${NUMBER},sip,,,public.cnum.info)})
exten => _011.,n,Log(DEBUG, "Route via ${ROUTE}")
; TODO - skip roitung when no result ...
exten => _011.,n,Dial(SIP/${ROUTE}, 20, rt)
exten => _011.,n,Hangup()

[from-internal]
include => cnum

Example below provide dialplan for prefix 011 and route any number via cnum.info routes.

You may use FreeSwitch demo number 888 for calling FreeSwitch demo server.

Dial number 011 888 (or replace 011 on your CNUM prefix when you use custom prefix) and talk with people ;)

cnum.info is compatible ENUM service on domain public.cnum.info.

When you create NAPTR request service will sending response with route.

A resolution therefore looks as follows:

$ dig 4.8.6.5.6.5.5.4.1.9.1.public.cnum.info NAPTR

; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> 4.8.6.5.6.5.5.4.1.9.1.public.cnum.info NAPTR
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35561
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;4.8.6.5.6.5.5.4.1.9.1.public.cnum.info. IN NAPTR

;; ANSWER SECTION:
4.8.6.5.6.5.5.4.1.9.1.public.cnum.info. 0 IN NAPTR 100 10 "u" "E2U+sip" "!^.*$!sip:888@conference.freeswitch.org!" .

;; Query time: 85 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jan 09 09:20:18 UTC 2017
;; MSG SIZE rcvd: 118