Prerequistes
Each linux distribution has its own way of
installing additional packages. In particular, adding the ability to
compile kernel device drivers varies greatly from distribution to
distribution. This howto expects that you have successfully installed
all packages which will allow zaptel device drivers to be compiled and
integrated with the kernel used in your particular distribution.
Please take the time now to make sure that you have installed build requirements for Asterisk, Libpri, and Zaptel as indicated in the installation instructions for Asterisk, Libpri and Zaptel.
Please note that pre-compiled versions of Asterisk, such as AsteriskNow and Trixbox are not useable, as they have been compiled with app_rpt support off.
We suggest that asterisk 1.4.x be used as the IAX channel drivers are greatly improved over asterisk 1.2, and special compile time options in app_rpt.c will need to be turned on if you wish to use app_rpt.c with Asterisk 1.2.
This howto assumes you will be installing Asterisk on a PC which has never had asterisk installed on it previously. Installation of app_rpt on existing Asterisk systems is beyond the scope of this howto.
Installing Asterisk Libpri and Zaptel
Zaptel must be installed first, followed by Libpri, and Asterisk. the Asterisk, Libpri, and Zaptel tarballs should be unpacked in /usr/src.
Download the latest tarballs of Asterisk, Libpri, and Zaptel from here.
Configure and build Zaptel by typing each of these commands in succession after the previous command completes:
./configure
make
make install
If you get any errors, go back and check to make sure you have the ability to compile linux device drivers for your distribution and kernel. This is the most common problem we see during installation.
Configure and build Libpri by typing each of these commands in succession after the previous command completes:
make
make install
Configure asterisk by typing
./configure
Follow the build instructions for Asterisk, but in addition, turn on app_rpt and RADIO_RELAX using 'make menuselect'
feature of the Asterisk build system to turn on these 2 features. App_rpt is located in the applications menu selection, and
RADIO_RELAX is located in the compile options menu selection. Type:
make menuselect
Get the latest version of app_rpt.c from here and install it in the /usr/src/asterisk/apps directory. Overwrite the current version of app_rpt with the newer version.
Compile and install Asterisk by typing each of these commands in succession when the previous command completes:
make
make install
make samples
Install the rpt sounds package by downloading the tarball into /var/lib/asterisk/sounds from here, then and unpacking it.
Once unpacked, an rpt directory should be visible in /var/lib/asterisk/sounds.
Default Configuration Files
We suggest you start with a default set of configuration files to initially test your setup. The default configuration files will enable one repeater channel and can be used as a starting point for your customized configuration. Our repository contains default configuration files for the 3 most common hardware configurations. The configuration files can be downloaded from here
The configuration files in the repository are organized as follows: In the top level directory, there are common configuration files. In three directories located below the top level directory, there are hardware specific files.
Download all of the files specific for your hardware and the common files into /etc/asterisk, overwriting the Asterisk's default configuration files installed previously. One of the files, zaptel.conf then needs to be moved from /etc/asterisk to /etc overwriting any previously installed version of zaptel.conf.
At this point it would be a good idea to shut the system down and install your hardware.
Hardware Installation
Note: Please ensure that AC power is disconnected from the PC before you install the hardware, and that you observe and Electrostatic Discharge (ESD) handling procedures during the installation of any PCI cards in the PC. In particular, you should wear an ESD grounding strap to ensure you are safely grounded.
Install the Interface card in an open PCI slot.
Reconnect AC power and power the system on and let it boot up.
Initial Bringup
To initially bring up Asterisk and app_rpt type the following commands from a root shell.
For the Quad Radio PCI card type:
modprobe pciradio
For the ARIB and TDM400 type:
modprobe wctdm
For the ARIB with a TE110p and channel bank type:
modprobe wcte110p
After doing one of the above, type:
ztcfg
This loads the contents of zaptel.conf into the zaptel driver.
Finally, after both steps above are completed, you can run Asterisk to see if it initializes correctly:
asterisk -vvvvvvc
If everything is properly configured, you should get a and ASTERISK CLI prompt.
From within the CLI prompt, you can now see if app_rpt has seized the correct channel by typing:
core show channels
One of the lines output should look like this:
Zap/1-1 s@default:1 Up Apprpt((Repeater Rx))
To verify app_rpt is running, type:
rpt stats 1999
The output should look similar to this:
************************ NODE 1999 STATISTICS *************************
Selected system state............................: 0
Signal on input..................................: NO
System...........................................: ENABLED
Scheduler........................................: ENABLED
Tail Time........................................: STANDARD
Time out timer...................................: ENABLED
Time out timer state.............................: RESET
Time outs since system initialization............: 0
Identifier state.................................: CLEAN
Kerchunks today..................................: 0
Kerchunks since system initialization............: 100
Keyups today.....................................: 0
Keyups since system initialization...............: 0
DTMF commands today..............................: 0
DTMF commands since system initialization........: 0
Last DTMF command executed.......................: N/A
TX time today ...................................:
TX time since system initialization..............:
Nodes currently connected to us..................: <NONE>
Last node which transmitted to us................: 2000
Autopatch........................................: ENABLED
Autopatch state..................................: DOWN
Autopatch called number..........................:
Reverse patch/IAXRPT connected...................: DOWN
User linking commands............................: ENABLED
User functions...................................: ENABLED
Conclusion
This concludes installation, configuration, and initial checkout of app_rpt.c. Now audio levels and signalling polarities must be set. This is the subject of a separate howto.