[Asterisk-Users] Re: pstn 800#'s

James H. Cloos Jr. cloos at jhcloos.com
Wed Feb 18 05:12:20 MST 2004


Netlabz> Anyone got dialing pstn 800#'s from asterisk behind nat with
Netlabz> fwd.pulver.com or iaxtel working ?

I'd suggest using the service provided by/for freenum.org.

See the archives for how to setup * to do an enum lookup on
freenum.org, or do a manual lookup and use that data statically.

But do note if you use it statically that things will break if they
change gateways....

An example lookup, for 1 888 555 1212 shows:

:; dig 2.1.2.1.5.5.5.8.8.8.1.freenum.org. naptr

;; ANSWER SECTION:
2.1.2.1.5.5.5.8.8.8.1.freenum.org. 21600 IN NAPTR 100 10 "u" \
  "E2U+voice:iax2" "!^\\+1888(.*)$!iax2:freenum at 216.234.116.184/1888\\1!" .
2.1.2.1.5.5.5.8.8.8.1.freenum.org. 21600 IN NAPTR 100 10 "u" \
  "E2U+sip" "!^\\+1888(.*)$!sip:1888\\1 at 216.234.116.184!" .
2.1.2.1.5.5.5.8.8.8.1.freenum.org. 21600 IN NAPTR 100 10 "u" \
  "E2U+iax2" "!^\\+1888(.*)$!iax2:freenum at 216.234.116.184/1888\\1!" .
2.1.2.1.5.5.5.8.8.8.1.freenum.org. 21600 IN NAPTR 100 10 "u" \
  "E2U+voice:sip" "!^\\+1888(.*)$!sip:1888\\1 at 216.234.116.184!" .

Meaning that Dial(IAX2/iax2:freenum at 216.234.116.184/18885551212)
or Dial(SIP/18885551212 at 216.234.116.184) will dial that number.


If you would liek to do some hacking for the community, it would be
cool to add support to *'s enum.c and apps/app_enumlookup.c to limit
a lookup (on a per-lookup basis) to just one channel (sip, h323, iax,
iax2 or tel) so that the dialplan can choose to eg prefer iax2 over
sip over h323.  (It already has support at the dialplan for dealing
differently with a tel result than the other supported results by
jumping to +51 on a tel: rather than +1 on a sip: et al.)

(As a side note, I just route my nanpa toll free calls via my paid
iax2 dods.  Ie, I do not differentiate the toll free nums from the
rest of nanpa.)

-JimC






More information about the asterisk-users mailing list