System information
The Asterisk wiki at https://wiki.asterisk.org/wiki/display/AST/Impor
tant+Security+Considerations outlines several steps you should take to
keep your Asterisk system secure. (Chapter 26 in this book also deals
with security.) It is vitally important that you read and understand this
page. If you ignore the security precautions outlined there, you may end
up allowing anyone and everyone to make long-distance or toll calls at
your expense!
If you don’t take the security of your Asterisk system seriously, you may
end up paying—literally. Please take the time and effort to secure your
system from toll fraud.
Extensions
In the world of telecommunications, the word extension usually refers to a numeric
identifier that, when dialed, will ring a phone (or system resource such as voicemail or
a queue). In Asterisk, an extension is far more powerful, as it defines the unique series
of steps (each step containing an application) through which Asterisk will take that call.
Within each context, we can define as many (or few) extensions as required. When a
particular extension is triggered (by an incoming call or by digits being dialed on a
channel), Asterisk will follow the steps defined for that extension. It is the extensions,
therefore, that specify what happens to calls as they make their way through the
dialplan. Although extensions can, of course, be used to specify phone extensions in
the traditional sense (i.e., extension 153 will cause the SIP telephone set on John’s desk
to ring), in an Asterisk dialplan, they can be used for much more.
The syntax for an extension is the word exten, followed by an arrow formed by the
equals sign and the greater-than sign, like this:
exten =>
This is followed by the name (or number) of the extension. When dealing with tradi-
tional telephone systems, we tend to think of extensions as the numbers you would
dial to make another phone ring. In Asterisk, you get a whole lot more; for example,
extension names can be any combination of numbers and letters. Over the course of
this chapter and the next, we’ll use both numeric and alphanumeric extensions.
Assigning names to extensions may seem like a revolutionary concept,
but when you realize that many VoIP transports support (or even ac-
tively encourage) dialing by name or email address rather than just by
number, it makes perfect sense. This is one of the features that makes
Asterisk so flexible and powerful.
110 | Chapter 6: Dialplan Basics