[Asterisk-doc] Connecting to a PRI

Gene Naden gene.naden at globalteldata.com
Wed Aug 17 10:59:53 CDT 2005


Thansks to all for your feedback. I have incorporated the following
suggestions and corrections into this revised doc. Again, further criticism
is welcome, it has been very helpful so far.

1. There is a discussion of E-1. It only lacks an example of the zaptel.conf
file. The number of channels is 32
2. ISDN PRI is a type of signaling used with E-1 and T-1. PRI is spelled
out: "Primary Rate Interface."
3. "D" channels are "delta", not "data"
4. Correct spelling of "confiuration"
5. No longer says you cannot have PCI cards in a rack-mounted server
6. No longer says the cable is RJ45
7.  Zapata channels are one-indexed: Zap/1, Zap/2, etc.

Gene Naden, MA
Programmer Analyst
GlobalTeldata II, LLC
4700 N. Ravenswood
Chicago, IL 60640
(773) 878-3161 x 223
-------------- next part --------------
T-1, E-1 AND PRI
In the context of Asterisk, T-1 and E-1 are digital telephony schemes 
that multiplex a number of voice channels onto one line. E-1 is used 
mainly in Europe and Asia, while T-1 is used in the United States and
Canada. In either case, signaling and framing information must be 
carried, either within the voice channels or in separate, non-voice 
channels. There are various signallng and framing schemes. 

One signaling scheme that is used with Asterisk for T-1 connections 
is ISDN PRI (Integrated Services Digital Network, Primary 
Rate Interface.) With IDSN PRI, a T-1 connection has 24 channels. 
In the context of Asterisk, channels 1-23 carry voice and are referred 
to as "B" (bearer) channels. Channel 24 carries signaling information 
and is referred to as a "D" (delta) channel.

ISDN PRI signaling is also used for E-1 connections. Such an E-1
connection has 32 channels. For Asterisk, channels 1-15 and 17-31 carry 
voice and are called "B" channels, while channel 16 carries signaling 
information and is called the "D" channel. Channel zero is used for 
framing. 

CONNECTING TO A PRI

To connect to a PRI you use Zapata technology. Zapata is also used for 
connecting to POTS lines (ordinary, single channel analog phone lines) and 
analog phones. You configure Zapata for Asterisk in the file 
/etc/zaptel.conf. Therefore this file can have information about both 
PRI connections and POTS line connections. See the example below.

You do not need a Channel Service Unit/Data Service Unit (CSU/DSU) to 
connect your PRI to the Asterisk computer.

All the Digium cards for connecting to a PRI are PCI cards. The TE405P
card is an example of a PRI interface card. It has four ports and therefore
can connect to up to four PRIs. Alternatively, one or more ports could be 
connected to channel banks for analog phones. However, channel banks are 
beyond the scope of this discussion.

Below is a sample Zapata configuration file (zaptel.conf). It shows the 
configuration for a single T-1 PRI, two analog phones and two POTS lines. 

# zaptel.conf

loadzone = us

#te405p card
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
fxols=1-23

#tdm400 card
fxoks=97-98
fxsks=99-100

The 23 B channels and the D channel are shown. 

The line "fxols=1-23" reflects the fact that the connection is to a PRI
rather than a channel bank. "ls" refers to "loop start." 

The way the channel numbering works is that the first 96 channels (one 
through 96) are for the TE405P card. The fxo and fxs channels, if any,
must follow, rather than precede, the PRI channels. In other words,
you cannot have fxoks=1-2, fxsks=3-4, bchan=5-27, dchan=28. If you
do this you will get an obscure error message.

Regarding the line beginning with the word "span", there is one span
for each port that is in use. The "span" line has the following format:

span=port number, timing, line build out, framing, coding

The port number is one because the PRI is connected to the first port on 
the card. 

The timing should be 1 for one of the ports. The line connected to that
port provides a timing reference. If other ports are used, the timing for 
those ports should be two or zero. Two means this line is a secondary 
timing reference and zero means this line is not used as a timing 
reference.

Line build out reflects the length of last leg of the connection and is set 
to zero if the length is less than 133 feet. The specific values for line 
build out are specified in the sample zaptel.conf that comes with Asterisk.

The framing option "esf" refers to "extended super frame" and "b8zs" refers 
to coding "Bipolar with 8 Zero Substitution."

TROUBLE-SHOOTING
When the PRI card was purchased from Digium, Digium has provided free
technical support for configuring the card.

The lights on the PRI card can be red, amber/green or green. When all is
well they are green. 

If Asterisk aborts when you try to start it, there are several things you
can check:

The Linux modules for your Zapata cards have to be loaded in order for the
connections to work. You load the PRI driver, wct4xxp, before you load the
FXS/FXO driver, wctdm. 

You also have to execute the program ztcfg to get things to work. If all is
well, when you run ztcfg it should not produce any output unless you 
specify verbose output ("ztcfg -vv"). When you run ztcfg, the lights should 
change to green, even if Asterisk has not been started.

Loading of the modules may or may not be done automatically by the system.

Digium says it is possible to construct a loop-back plug to test your 
PRI card. You do this using an RJ45 plug, connecting pin one to pin four 
and pin two to pin five. When the loop-back connector is connected to the 
card, the light should turn green. Again, the modules have to be loaded 
and possibly ztcfg has to have been run.

The B channels listed in zaptel.conf must agree with the channels listed in
/etc/asterisk/zapata.conf, otherwise Asterisk may abort when you try to
start it. Zapata channels are indexed starting at one rather than zero 
(Zap/1, Zap/2, etc.)


More information about the Asterisk-Doc mailing list