text
stringlengths
0
152
Note that changing from FXO to FXS is not something you can simply do with a set‐
tings change. FXO and FXS ports require completely different electronics.
This stuff is old-school, folks. You can run old phones from 100 years ago off an FXS
port!
We do not recommend the use of analog trunks in an Asterisk system. Their configu‐
ration and use is outside of the scope of this book.4
4 We should note, however, that we’ve written extensively on the subject in the past, and that body of work has
been released under Creative Commons licensing, and is freely available.
112
|
Chapter 7: Outside Connectivity
Digital telephony
Digital telephony was developed in order to overcome many of the limitations of
analog. Some of the benefits of digital circuits include:
• No loss of amplitude over long distances
• Reduced noise on circuits (especially long-distance circuits)
• Ability to carry more than one call per physical circuit
• Faster call setup and teardown
• Richer signaling information (especially if using ISDN)
• Lower cost for carriers
• Lower cost for customers (at higher densities)
There were several fundamental digital circuits that gained wide acceptance in the
telecommunications industry:
T1 (24 channels)
Used in Canada and the United States (mostly for ISDN-PRI)5
E1 (32 channels)
Used in the rest of the world (ISDN-PRI or MFC/R2)
BRI (2 channels)
Used for ISDN-BRI circuits (Euro-ISDN)
Note that the physical circuit can be further defined by the protocol running on the
circuit. For example, a T1 could be used for either ISDN-PRI or CAS, and an E1
could be used for ISDN-PRI, CAS, or MFC/R2.
It is difficult to justify these circuit types anymore. Relative to VoIP protocols, they
have become expensive, complex, and somewhat inflexible. If you need to connect
such circuits to an Asterisk system, we recommend some sort of gateway device to
convert the circuit into SIP, and then connect via SIP to your Asterisk system. If you
want a single-chassis system, companies such as Digium and Sangoma offer digital
PSTN cards that can be installed directly into your Asterisk server; they are
5 There’s also a circuit used in Japan called a J-1, which is most simply described as a 24-channel E1.
The PSTN
|
113
connected to Asterisk by way of the DAHDI channel driver. The use of this technol‐
ogy is outside of the scope of this book.6
VoIP
Compared to the lengthy history of the telecommunications industry,7 VoIP is still a
relatively new concept. For the century or so prior to VoIP, the only way to connect
your site to the PSTN was through the use of circuits provided for that purpose by
your local telephone company. VoIP now allows for connections between endpoints
without the PSTN having to be involved at all (although in most VoIP scenarios,
there will still be a PSTN component at some point, especially if there is a traditional
E.164 phone number involved). The PSTN still controls the phone numbers, and we’ll
be using those until somebody comes up with an internet-based addressing mecha‐
nism that is not subject to abuse the way email has been.8
Network Address Translation
If you are going to be using VoIP across any sort of wide-area network (such as the
internet), you will be dealing with firewalls, and quite frequently network address
translation (NAT) as well.9 A basic understanding of how the SIP and RTP protocols
work together to create a VoIP call can be helpful in understanding and debugging
functional problems (such as the “one-way audio” issue NAT configuration errors can
often create). NAT allows a single external IP address to be shared by multiple devices
behind a router. Since NAT is typically handled in the firewall, it also forms part of
the security layer between a private network and the internet.
A VoIP call using SIP doesn’t consist just of the signaling messages to set up the call
(the SIP part of the connection). It also requires the RTP streams (the media), which
carry the actual audio connection,10 as shown in Figure 7-1.