Hardware Installation

You'll need an adapter from a vendor such as Digium, Sangoma (or Cronyx), OpenVox, Rhino Equipment T1/E1 WAN interfaces, beroNet beroFix card or Positron Telecom. As a general rule, these interfaces should be installed in your Asterisk system PCI bus prior to compiling or configuring the system.

beroNet

beroNet offers driver independant PRI(E1) PCI and PCIe cards. They run on Linux andWindows. They are very easy to setup compared to passive cards. berofix solves thetraditional VoIP to TDM issues like Echo and Fax and it is even modular.

OpenVox

Both D410P/D210P/D110P are high-performance PCI BusMaster Cards and very easy to us.

The drivers for these cards are also in the zaptel portion of the Asterisk build.

Positron Telecom

Positron is the only provide of a PBX Blades - all you need to do is configure it through a web browser. ZAP and DADHI are running on the board so it will not require any CPU resources on the board and can even be installed in Windows or VMWARE. Positron offers better performance, easier configuration, the fastest echo canceller and much much more:

Sangoma

Cronyx

You can also use E1 cards from Russian designer/manufacturer company Cronyx. Tau-PCI/2E1(4E1) (2 or 4 ports) is obsolete design. Tau32 (2-port but only 1 port can be used - see below) and Tau32-lite (1-port) devices are of relatively new design, giving excellent results in our tests and running in production for almost year already.

It is very important to mention, that even on 2port tau32 device you can use only one E1. This is because it's internal design consists of 3 E1s - 2 are ports, and third is logical E1 routed to PCI and further - into your favourite software package. Between ports and internal E1 sits cross-connector which can pick and combine timeslots from ports, and directly link any unused timeslots. But it is technically impossible to feed more than 2048kbit of data from/to any Tau32 board.

2-port Tau32 device is ideal for custom telephony applications like signalling converters and signalling proxy. Just extract out signalling timeslots from each port, and B-channels are automatically cross-connected by hardware.

Software Installation

If you are using Sangoma cards, follow the entire installation procedure described in the Sangoma wiki link shown below. The difference is that Asterisk software is untarred, Sangoma drivers are untarred and built, then zaptel is built, followed by libpri being built (optional), and Asterisk being built.

libpri Installation

Nothing special about installing Asterisk libpri. Just follow the instructions.

Gathering Configuration Information

Installed Span Numbers

Gathering the span number information is trivial if you have only one T1 or E1 card in an Asterisk box. The task becomes ponderous with the addition of a second card.

Digium spans are numbered according to the order of their loading. Associating a span number with a physical port is obvious if there is only one E1 or T1 card in the system. If the card has four ports then the port 1-4 are configured as spans 1-4. If there are 2 or more cards in the system, then a manual discovery procedure is needed to know how to associate card and port number to span number. In fact, there are two procedures, where one is for distingushing T1 from E1, and the other for distinguishing between two similar interfaces. The second procedure requires an E1 or T1 circuit that is turned up on the far end - which might be difficult to know with a virgin system. In this case it might be useful install and configure only one T1/E1 card so an operational benchmark is established.

Sangoma spans are defined instead of discovered from loading order. Span numbering should begin with 1 if there are no Digium spans in the system. Span numbers are defined in zaptel and Sangoma configuration files later on. One should probably begin Sangoma span numbers which the next value after the last Digum span in a system with both Digium and Sangoma spans. The Sangoma README.asterisk explains that it is important to start the Sangoma ports in span number order. They must be stopped in reverse span number order. The order of starting and stopping Sangoma ports also depends on clocking choices which is described in the the README.asterisk file. More detail on these topics will be provided later in this document.

/etc/zaptel.conf

This file covers all of the interface types. Only the PRI aspects are covered in this discussion. If you are using Sangoma T1/E1 interfaces the be aware that the information in /etc/zaptel.conf must be closely synchronized with the Sangoma configuration process described later in this document.

The example that is commonly used in Asterisk documentation follows:

span=1,1,0,esf,b8zs
bchan=1-23
dchan=24

This stanza describes a T1 carrying PRI service. The B channels are on slots 1-23 and the D channel is on slot 24. Most people talk about slots 1-24 on a T1. Systems vary and use 0-23 or 1-24. When coordinating channelized services always confirm how the slots are numbered.

T1 has 24 channels and up to 24 channels may be used to carry voice and signaling.

E1 has 32 channels. Channel 0 is used for framing. Channel 16 is often used for signaling. Channels 1-15 and 17-31 are used to carry voice.

Use the references above to understand the span= line.

It is important to fully understand the meaning and operational implications of timing parameter choice. A good place to start is with the O'Reilly T1: A Survival Guide.There should be a single clock master for all links. It's not clear if the master applies to both T1 and E1 in a single Asterisk platform supporting both types of facilities from the existing documentation.

# span=<span num>,<timing source>,<line build out (LBO)>,<framing>,<coding>[,yellow]
#
# All T1/E1 spans generate a clock signal on their transmit side. The
# <timing source> parameter determines whether the clock signal from the far
# end of the T1/E1 is used as the master source of clock timing. If it is, our
# own clock will synchronise to it. T1/E1's connected directly or indirectly to
# a PSTN provider (telco) should generally be the first choice to sync to. The
# PSTN will never be a slave to you. You must be a slave to it.
#
# Chose 1 to make the equipment at the far end of the E1/T1 link the preferred
# source of the master clock. Chose 2 to make it the second choice for the master
# clock, if the first choice port fails (the far end dies, a cable breaks, or
# whatever). Chose 3 to make a port the third choice, and so on. If you have, say,
# 2 ports connected to the PSTN, mark those as 1 and 2. The number used for each
# port should be different.
#
# If you choose 0, the port will never be used as a source of timing. This is
# appropriate when you know the far end should always be a slave to you. If the
# port is connected to a channel bank, for example, you should always be its
# master. Any number of ports can be marked as 0.
#
# Incorrect timing sync may cause clicks/noise in the audio, poor quality or failed
# faxes, unreliable modem operation, and is a general all round bad thing.

Sangoma Configuration

Configuring the Sangoma interfaces requires making Sangoma specific choices and re-entering some information that was put into /etc/zaptel.conf described above.

There is a configuration tool (/usr/sbin/wancfg) that's built and installed. The tool is an ncurses application that takes the user through a series of menus. At the end of the process the configuration tool write a file to /etc/wanpipe/wanpipeX.conf where X is a number 1..n and corresponds to a T1/E1 port on a card. It's important to understand that Sangoma interfaces support many data protocols, so there are many choices that simply don't apply to an Asterisk PRI setup.

The clock hierarchy is also addressed in the Sangoma configuration but it is outside the current capability of the configuration tool. This modification must be done by hand to each /etc/wanpipe/wanpipeX.conf file.

/etc/asterisk/zapata.conf

In /etc/asterisk/zapata.conf you'll something like the stanza below to get started:

A less common configuration is to connect to a carrier LD (long distance PRI). In this scenario you will typically connect to a Lucent 4ESS tandem switch. The zapata.conf configuration for this connection is:

Verify Loading and Functioning

Verify the successful loading of modules by watching the /var/log/messages tail. Errors will be plainly evident. If the drivers are loaded without errors in /ver/log/messages, then use lsmod to inspect what is currently loaded. Here is the output from lsmod on a system with an TDM400P and a Sangoma A102:

If you are pretty sure that your system is configured O.K. but it isn't working (i.e. /proc/zaptel/1 includes the words 'down' or 'error'!)ring your ptt (or whoever is on the other end of the E1 line) and ask them if they have provisioned the line and if it is in service. (often they won't do this until you ask them.) They may also take a line out of service if it gives too many errors, so you may need to call them after an outage or hardware replacement.

If you change low level PRI parameters (eg clock source) it is worth powercycling your asterisk box. This ensures that both ends of the E1 start with the fresh configuration.

Specifics on Service Variations

Identify and explain variations by country, equipment, etc.

Country Variations

Canada

United Kingdom

If you wish to set the outgoing callerID you need to tell your PTT that you wish to do this, and ask them how many digits they expect you to send. 20050602, Nick Barnes - The above isn't necessarily true. All the BT lines I've installed have this enabled by default.

If you have multiple numbers routed to this PRI you need to tell the PTT you wish to do this and ask them how many digits they will send. 20050602, Nick Barnes - Note that enabling CLIP (Caller Line Identity Presentation) on the line also has the effect that DDI information is passed to Asterisk (i.e. with 'immediate=no'). Since CLIP is generally a good thing, this is the only feature I order on the line.