text
stringlengths
0
152
54
|
Chapter 4: Certificates for Endpoint Security
wherever possible. We’re not claiming to present the final word on VoIP security, but
we are going to deliver examples that pay more than lip service to the concept.
Next up, we’ll discuss how to configure endpoints on your Asterisk system (using the
keys and certificates we’ve just generated).
Conclusion
|
55
CHAPTER 5
User Device Configuration
I don’t always know what I’m talking about, but I know I’m right.
—Muhammad Ali
It’s time to connect some SIP user devices to Asterisk. While we are going to focus on
the Asterisk end of things, keep in mind that defining a channel in Asterisk for the
device to connect through is only half of the configuration; you also need to config‐
ure the other end—the device itself (usually a phone)—so it knows where to send its
calls.
An Important Note About SIP Endpoints
Configuring the other end of the SIP relationship is of course necessary, but is not
part of Asterisk configuration, and ultimately is out of the scope of this book. There
must be thousands of different types of SIP endpoints in the market, including desk
phones, softphones, PBXs, proxy servers, conferencing servers, and all manner of
other products. Each manufacturer has its own tools to allow you to configure its
products (and some of them require extensive knowledge). SIP is a complex protocol.
Having said that, most SIP desk telephones have some sort of web interface, and most
softphones have a configuration menu built into their GUI.
At its simplest, configuring a SIP device involves providing three parameters:
• Address of the server it’s going to connect through (your Asterisk server)
• Username (which could also be called the subscriber name, extension, or some‐
thing similar)
• Password
57
While each type of endpoint is going to be different, they’ll all follow a similar con‐
vention, and while there are potentially hundreds of configuration options, it’s quite
common to only configure those three things.
In other words, there are two separate tasks needed to configure a device to work
with Asterisk:
• Telling Asterisk about the device (configuring the channel credentials in
Asterisk)
• Telling the device about Asterisk (accessing the configuration tools for the device,
and telling it where its server is and how to connect)
Some Thoughts About SIP
SIP is a peer-to-peer protocol, and while it is common to have a setup where end‐
points (telephones) behave as clients, and some sort of gateway (such as Asterisk)
provides routing and features, the protocol itself works in terms of peer-to-peer rela‐
tionships (Figure 5-1). Two SIP endpoints can talk directly to each other (i.e., a pair of
SIP telephones should in theory be able to create a sort of “intercom” directly between
each other without a PBX in the middle).
That being said, by far most SIP transactions happen through a server of some sort,
which typically remains in the call path and bridges all connections (also not required
by the protocol). When a SIP call is made from a telephone to another telephone
through Asterisk, there are actually two calls happening: a call from the originating
set to Asterisk, and another separate call from Asterisk to the destination set (this sec‐
ond leg of the call might not even use SIP). Asterisk bridges the two together inter‐
nally. Similarly, if you are making an “external” call, Asterisk will accept the call from
your set, and then send a call out another channel that would be considered a trunk,
and again would bridge those channels together. At the protocol level, a set-to-set and
set-to-trunk call look very similar.
Using a SIP phone with Asterisk means that you will want to configure the SIP tele‐
phone to send all its calls to Asterisk, even though the device is quite capable of
directly connecting to another SIP endpoint without the Asterisk server. The phone
will treat Asterisk as its registrar and proxy server (even though Asterisk is in fact a
Back to Back User Agent, or B2BUA) and will look to Asterisk for routing decisions
for all calls.
58
|
Chapter 5: User Device Configuration