text
stringlengths
0
152
cost (typically free, or around $30 for a fully featured one) is attractive. Since many
softphones are free, it is likely that the first telephone set you connect to Asterisk will
be a softphone. Also, because softphones are just software, they are easy to install and
upgrade, and they commonly have other features that utilize other peripherals, like a
webcam for video calling, or perhaps an ability to load files from your desktop for
faxing. Another potentially huge advantage of a softphone is that it is often possible
to integrate them with other applications running on the device.
Some of the disadvantages of softphones are the not-always-on nature of the devices,
the necessity to put on a headset each time you take a call, and the fact that many PCs
will at random times during the day choose to do something other than what the user
wants them to do, which might cause the softphone to stop working while some back‐
ground task hogs the CPU. In a mobile device, the softphone can consume resources,
affecting battery life, performance, and operating expense.
1 Or any other network, for that matter. ATAs could more formally be said to be analog-to-digital gateways,
where the nature of the digital protocol may vary (e.g., proprietary ATAs on traditional PBXs). Point being, an
ATA is not necessarily a SIP device.
Hardphones, Softphones, and ATAs
|
63
ATAs have the advantage of allowing you to connect analog devices to your SIP net‐
work,2 such as cordless phones (which are still superior in many cases to more
advanced types of wireless phones, and far less expensive3), paging amplifiers, ringers,
and antique telephones.4 ATAs can also sometimes be used to connect to old wiring,
where a network connection might not function correctly, or to outbuildings (such as
a gatehouse), where a standard ethernet connection would never reach.
The main disadvantage of an ATA is that you will not get the same features through
an analog line as you would from a SIP telephone. This is technology that is over a
century old.
With Asterisk, we don’t necessarily need to make the choice between having a soft‐
phone, a hardphone, or an ATA; it’s entirely possible and quite common to have a
single extension number that rings multiple devices at the same time, such as a desk
phone, the softphone on a laptop, a cell phone, and perhaps a strobe light in the back
of the factory (where there is too much noise for a ringer to be heard).
More than any other endpoint, the softphone is set to evolve into something far more
encompassing than a simple telephone application. The emergence of WebRTC may
finally deliver that which has been predicted for many long years: the integration of
real-time voice into computing (specifically web-based) applications. There are of
course many ways to achieve this already, but WebRTC’s advantage is that it is an
open standard, built right into all browsers with no plug-ins required. The softphone
is dead; long live the softphone.
We still like a desk phone for regular telephone calls, though.
Configuring Asterisk
In this section we’ll cover how to configure PJSIP to handle various SIP endpoints.
This was traditionally done by editing files in the /etc/asterisk/ directory; however, we
have elected to demonstrate how this is done through a database, as it is a generally
superior method, especially as a system grows. If you are more comfortable with
2 An ATA is not the only way to connect analog phones. Hardware vendors such as Digium and Sangoma sell
cards that go in the Asterisk server and provide analog telephony ports. Larger installations can also use chan‐
nel banks or MSANs; however, this method of connecting legacy telecom circuits is a more advanced subject,
and not the focus of this book.
3 For a really awesome cordless analog phone, you want to check out the EnGenius DuraFon devices, which are
expensive, but impressive.
4 Our friend Brian Capouch has mashed together many entertaining demonstrations of how antique telephone
hardware can be made to work with Asterisk.
64
|
Chapter 5: User Device Configuration
using .conf files, you should find that fairly easy to do once you have the basics fig‐
ured out.5
Asterisk allows devices using many different protocols to speak to
it (and therefore to each other), but chan_pjsip is the only VoIP
module that is still actively maintained; the rest are legacy code.
You aren’t likely to have any use for other VoIP protocols (such as
IAX2, Skinny/SCCP, Unistim, H.323, and MGCP). Those protocols
have an historical significance, since it was in large part due to the
fact that Asterisk would talk to anything and everything that it had
such an impact on the telecom industry. Nowadays, however, SIP
has pretty nearly replaced everything, so those channel drivers are
now historical curiosities, and nothing more. If you are still interes‐
ted in one of those other protocols, focus on getting comfortable
working with SIP first, and recognize that you’re going to be pretty
much on your own.
The channel configuration tables in the database6 contain the configuration details
relevant to that channel driver, as well as the parameters and credentials specific to
the SIP devices and providers you wish to connect to Asterisk (incoming and outgo‐
ing). To put that more simply: all calls in and out of Asterisk must pass through a