text
stringlengths
0
152
for the web GUI—you usually do this by dialing a specific code on the attached ana‐
log phone, which results in the IP address being read back to the caller.
Of course, an ATA may also feature an FXO interface, which will also need to be con‐
figured to properly interact with the analog line provided in your region. The types of
things that need to be changed are similar to the FXS interface.
What if you are connecting your analog phone or line to a Digium card? We’ll cover
this next.
PSTN Connectivity, DAHDI, Digium Cards, and Analog
Phones
Before we get to DAHDI and Asterisk configuration, we need to physically connect to
the PSTN. Unfortunately, there are no worldwide standards for these connections; in
fact, there are often variations from one part of a given country to another.
Primary Rate Interfaces (PRIs) are generally terminated in an RJ45 connection these
days, although the impedance of the connections can vary. In some countries (nota‐
bly in South America), it is still possible to find PRIs terminated in two BNC connec‐
tors, one for transmit and one for receive.
Generally speaking, a PRI terminated in an RJ45 will be an ISDN connection, and if
you find the connection is made by a pair of BNC connectors (push-and-twist coaxial
connectors), the likelihood is that you are dealing with an older CAS-based protocol
(like MFCR2).
Figure 9-3 shows the adapter required if your telco has supplied BNC connectors
(Sangoma/Digium cards require an RJ45 connection). It is called a balun, as it con‐
verts from a balanced connection (RJ45) to an unbalanced connection (the BNCs), in
addition to changing the connection impedance.
Basic Rate Interfaces (BRIs) are common in continental Europe
and are almost always supplied via an RJ45 connection.
PSTN Connectivity, DAHDI, Digium Cards, and Analog Phones
|
153
Figure 9-3. A balun
Analog connections vary massively from place to place—you will know what kind of
connector is used in your locality. The important thing to remember is that the ana‐
log line is only two wires, and these need to connect to the middle two pins of the
RJ11 plug that goes into the Digium card—the other end is the local one. Figure 9-4
shows the plug used in the UK, where the two wires are connected to pins 2 and 5.
Figure 9-4. The BT plug used for analog PSTN connections in the UK (note only pins 2–
5 are present)
The Digium Asterisk Hardware Device Interface, or DAHDI, actually covers a num‐
ber of things. It contains the kernel drivers for telephony adapter cards that work
within the DAHDI framework, as well as automatic configuration utilities and test
tools. These parts are contained in two separate packages (dahdi-linux and dahdi-
tools), but we can also use one complete package, called dahdi-linux-complete. All
three packages are available at the Digium site.
Once you have established the type of PRI connection the telco has given you, there
are some further details that you will require in order to properly configure DAHDI
and Asterisk (e.g., whether the connection is ISDN or a CAS-based protocol). Again,
you will find these in Chapter 7.
154
|
Chapter 9: Internationalization
DAHDI Drivers
The connections where some real localization will need to take place are those of ana‐
log interfaces. For the purposes of configuring your Asterisk-based telephone system
to work best in a given locality, you will first need to specifically configure some low-
level aspects of the way the Digium card interacts with the connected device or line.
This is done through the DAHDI kernel driver(s), in a file called /etc/dahdi/
system.conf.
In the following lines (taken from the sample configuration that you get with a fresh
install of DAHDI), you will find both the loadzone and defaultzone settings. The
loadzone setting allows you to choose which tone set(s) the card will both generate
(to feed to analog telephones) and recognize (on the connected analog telephone
lines):
# Tone Zone Data
# ^^^^^^^^^^^^^^
# Finally, you can preload some tone zones, to prevent them from getting
# overwritten by other users (if you allow non-root users to open /dev/dahdi/*
# interfaces anyway). Also this means they won't have to be loaded at runtime.
# The format is "loadzone=<zone>" where the zone is a two-letter country code.
#
# You may also specify a default zone with "defaultzone=<zone>" where zone
# is a two-letter country code.
#
# An up-to-date list of the zones can be found in the file zonedata.c
#
loadzone = us
#loadzone = us-old
#loadzone=gr
#loadzone=it
#loadzone=fr