System information

John Todd notes: “For those sites which have extremely complex configurations or geo-
graphically diverse offices with different SIP servers handling different prefixes (for in-
stance: 12xxx goes to the Asterisk server in France, 13xxx to the Asterisk server in Ger-
many, and so on) then there are more sophisticated methods where you run your own
delegated zone out of the freenum.org domain, but those are outside the scope of this book
but can be learned about on the freenum.org site.
Testing Your ITAD
As is often the case with DNS changes, it can take a few days for your changes to
propagate through the system. To check, you can Google for “online dig tool” to find
a web-based lookup tool, or use the dig tool under Linux:
$ dig NAPTR 4.3.2.1.1273.freenum.org
Once your record is updated in the system, the result will include the following:
;; ANSWER SECTION:
4.3.2.1.1273.freenum.org. 86400 IN NAPTR 100 10 "u" "E2U+sip"
"!^\\+*([^\\*]*)!sip:\\1@shifteight.org!" .
If the answer section does not include the regular expression containing your domain
name, the records have not updated and you should wait a few more hours (or even
leave it for a day).
Using ISNs in Your Asterisk System
So now that you’ve got your own ITAD (you did sign up, right?), you’ll want to make
it available to others, and also configure your dialplan to allow you to dial other ITADs.
Under the [globals] section of your dialplan (/etc/asterisk/extensions.conf), add a global
variable that contains your ITAD:
[globals]
ITAD = 1273 ; replace '1273' with your own ITAD number
To allow calling to ITADs from your system, you will need something like the following
dialplan code
:
[OutgoingISN]
exten => _X*X!,1,GoSub(subFreenum,start,1(${EXTEN}))
exten => _XX*X!,1,GoSub(subFreenum,start,1(${EXTEN}))
exten => _XXX*X!,1,GoSub(subFreenum,start,1(${EXTEN}))
exten => _XXXX*X!,1,GoSub(subFreenum,start,1(${EXTEN}))
exten => _XXXXX*X!,1,GoSub(subFreenum,start,1(${EXTEN}))
; you may need to add more lines here to handle XXXXXX*X, XXXXXXX*X, and so forth
If people publish the users’ full DIDs instead of their internal extension numbers, the pattern matches will
need to support up to 15 digits.
254 | Chapter 12:Internet Call Routing