text
stringlengths
0
152
net had designed the telephone network (and phone calls were as free as email), all
our SIP phones would likely be ringing all day long with one spammy call after
another. That still happens, but it’s greatly reduced by the fact that a phone call costs
money, and even if it costs just pennies, that’s enough to keep much of the exceed‐
ingly mindless spam out of the game.
Another feature the PSTN offers is standards compliance and interoperability. If you
look at any internet-based voice product, they are either proprietary walled gardens,
or they are community-driven and have failed to gain any useful traction. It is our
110
|
Chapter 7: Outside Connectivity
belief that this will not change until some sort of trust mechanism exists that ensures
the identities of incoming callers have been verified by some widely recognized
authority.
Traditional PSTN Trunks
This section has been written as a nod to the telecommunications
industry, and to the history of Asterisk itself. It is in part because
Asterisk could talk to so many different sorts of old-school circuits
that it achieved the early success it did. These days, the use of these
old circuits has for the most part faded into history.
There are two types of fundamental technology that PSTN carriers have used to
deliver telephone circuits: analog and digital.
Analog telephony
The first telephone networks were all analog. The audio signal that you generated
with your voice was used to generate an electrical signal, which was carried to the
other end. The electrical signal had the same characteristics as the sound being pro‐
duced.
Analog circuits have several characteristics that differentiate them from other circuits
you might wish to connect to Asterisk:
• No signaling channel exists—line state signaling is electromechanical, and
addressing is done using in-band audio tones.
• Disconnect supervision is usually delayed by several seconds, and is not com‐
pletely reliable.
• Far-end supervision is minimal (for example, answer supervision is lacking).
• Differences in circuits mean that audio characteristics will vary from circuit to
circuit and will require tuning.
Incoming analog circuits that you wish to connect to your Asterisk system will need
to connect to a Foreign eXchange Office (FXO) port. Since there is no such thing as
an FXO port in any standard computer, an FXO port of some sort must be provided
to the system before you can connect traditional analog lines. Companies such as
Digium and Sangoma offer such cards, but you can also purchase a SIP device that
provides such ports.
The PSTN
|
111
FXO and FXS
For any analog circuit, there are two ends: the office (typically the central office of the
PSTN) and the station (typically a phone, but could also be a card such as a modem
or line card in a PBX).
The central office is responsible for:
• Power on the line (nominally 48 volts DC)
• Ringing voltage (nominally 90 volts AC)
• Providing dialtone
• Detecting hook state (off-hook and on-hook)
• Sending supplementary signaling such as caller ID
The station is responsible for:
• Providing a ringer (or at least being able to handle ringing voltage in some
manner)
• Providing a dialpad (or some way of sending DTMF)
• Providing a hook switch to indicate the status of the line
A Foreign eXchange (FX) port is named by what it connects to, not by what it does. So,
for example, a Foreign eXchange Office (FXO) port is actually a station: it connects to
the central office. A Foreign eXchange Station (FXS) port is actually a port that pro‐
vides the services of a central office (in other words, you would plug an analog set
into an FXS port).