System information

Our code for performing the lookup then looks like this:
exten => start,n,Set(Result=${ENUMLOOKUP(${ISN},sip,s,,freenum.org)})
Following the lookup and storing the result in the ${Result} channel variable, our
subroutine will verify whether we received a result or not:
exten => start,n,GotoIf($[${EXISTS(${Result})}]?call,1:no_result,1)
If no result is received, the call will be handled in the no_result extension. If a result is
received back from our lookup, then execution will continue at the call extension
where the call will be placed using the result stored in the ${Result} channel variable.
Receiving calls to your ITAD
Receiving calls to your ITAD is much simpler. If your system supports incoming SIP
URIs, ISNs will already work for you.
#
We showed the configuration required to accept
calls to your system in “Accepting Calls to Your System” on page 240.
Security and Identity
It is a sad fact of the Internet that there are a few selfish, greedy criminal types out there
who think nothing of attempting to take advantage of people for their own gain. In
telecom, this behavior represents several risks to you.
In this section, we will focus on security issues relating to the portions of your system
that you intend to make publicly available through the Internet. While it would be
simple to just refuse to allow any sort of external connections, the reality is that if you
want people to be able to call you for free from the Internet (for example, if you intend
to publish your company’s SIP URIs on your web page), you are going to have to define
a secure place within your system where those calls will arrive. Securing your incoming
public VoIP connections is conceptually similar to implementing a DMZ in traditional
networking.
*
In Asterisk, certain contexts in your dialplan cannot be trusted. This means that you
will need to carefully consider what resources are available to channels that enter the
system through these contexts, and ensure that only certain services and features are
available.
#If you’ve set up your ITAD and ISN correctly, the conversion from ISN dial string to SIP URI will take place
before the call arrives on your doorstep.
* A DMZ is any portion of your network that you expose to the Internet (such as your website), and therefore
cannot completely trust. It is not uncommon for organizations to place the PBX within a DMZ.
256 | Chapter 12:Internet Call Routing