text
stringlengths
0
152
Figure 5-1. Asterisk is a gateway
Some Thoughts About Set Provisioning
While most devices will have a web-based interface for defining parameters, if you’re
putting more than one or two phones into production you should look into using a
server-based provisioning process of some sort. In this way, sets will connect to the
server, identify and authenticate, and download customized files that contain their
parameters (it is very common to use the MAC address of the telephone as an identi‐
fier for naming each unique config file). Configuration files for various products are
commonly served up by an HTTPS or SFTP server, and will be formatted as XML or
some form of key/value pairs.
Unfortunately, the exact download process, protocol, and syntax of these files will dif‐
fer from manufacturer to manufacturer. It’s not difficult to learn if you’re familiar
with such concepts, but to attempt to cover all of them (and keep ever-changing pro‐
cesses up to date) would be impossible. Manufacturers usually offer freely download‐
able and detailed configuration guides for their telephones, so with a bit of research
and familiarity with configuring file services on Linux, you will find a wealth of infor‐
mation is available online. In our experience the documentation provided by the
manufacturers is generally excellent. It will represent the most up-to-date information
on provisioning their devices.
User Device Configuration
|
59
When you are troubleshooting set provisioning, always test the download using a
computer first. If you can’t download the files on your computer, your sets probably
won’t be able to download them either.
We will say one final word about this: make sure whatever process you use includes
encryption of the config files, so that if the files are stolen, only the intended recipient
is capable of decrypting them. Most manufacturers have done a good job of making
this a fairly simple thing to achieve. Don’t send unencrypted configuration files across
the public internet.
In this chapter we focus on the configuration of sets from the perspective of Asterisk,
so we’re not going to say too much about bootstrapping phones; you are going to
need to do your own research in that regard. We’ll be using a couple of softphones in
our lab, and you can too. Our examples will attempt to provide enough information
that you’ll be able to configure whatever SIP devices you are using. If we can get you
through registering a couple of softphones on your lab system, we’ll have set you on
the path toward more complex scenarios (which will typically require some research
and prototyping on your part).
Telephone Naming Concepts
Before we get started with configuring Asterisk for our telephones, we are going to
recommend some best practices regarding telephone naming.
First up, you should not assign your telephones an extension number; instead, design
the system so that the extension number is assigned to the user, and then assign tele‐
phones or other resources to that user. The telephones themselves should be named
in reference to something unique to them, such as a MAC address or computer name.
In a flexible, next-generation PBX, you want to abstract the concepts of users, exten‐
sion numbers, and telephones, so as to have the most flexibility and ease of
management.
In Asterisk, there is really no concept of a user at all. Extensions are triggers that ini‐
tiate a sequence of instructions. Yes, you might write a bit of dialplan specifying that
when extension number 100 is dialed, Asterisk will ring the phone on your desk.
However, extension 100 could just as easily access a company voicemail box, or per‐
haps play back a prompt, join a conference room, or do any number of other things.
We can even write dialplan that specifies that extension 100 should ring the device on
your desk from Monday to Friday between 9 A.M. and 5 P.M., but ring a device on
someone else’s desk the rest of the time. Inversely, when a call is made from a device
during business hours, the caller ID could show a daytime number, and the rest of the
time could show an after-hours number (many reception desks become security
desks at night).
60
|
Chapter 5: User Device Configuration
In Asterisk, extensions are not phones. Therefore, don’t give your telephones identifi‐
ers that are extensions.
Asterisk Extensions
The concept of an extension in Asterisk is crucial. In most PBXs, an extension is a
number that you dial to cause a phone or service to ring. In Asterisk, an extension is
the name of a grouping of instructions in the dialplan. Think of an Asterisk extension
as a script name, and you’re on the right track. Yes, an Asterisk extension could be a
number that rings a phone, but it could just as easily be a word (such as voicemail)
that provides a simple service of some sort, without ever sending the call out any
channel.
We’ll be going into Asterisk extensions in far more detail throughout this book, but
before we do that we want to get some phones set up.
The abstraction between the name of an extension and the telephone that extension
might ring is a powerful concept. An excellent example of this is a PBX feature com‐
monly known as hot-desking, which allows users to share a desk and/or move around
to different desks. Let’s say we have three sales agents who typically work outside of
the office, but spend a couple of days each month in the office to do paperwork. Since
they are unlikely to be on-site at the same time, instead of each agent having a sepa‐
rate telephone, they could share a single office phone (or on a larger scale, a dozen
folks could share a pool of, say, three phones). This scenario illustrates the conve‐