Applying the Asterisk and Zaptel Patches
Last Updated: 2007-03-31
Note that the < sign in the patch
commands is required! I
am also assuming you have a working Asterisk configuration already in
place. Substitute /path/to/download
with whatever directory path where you've your downloaded files.
Keep in mind that my current
patches, zaptel-1.2.13-cnet4.patch
and asterisk-1.2.16-cnet.patch,
work fine with Zaptel 1.2.16 and Asterisk 1.2.17, respectively.
WARNING: Pulse dialing on T1 channel bank FXO ports may or may not work
for you! I've noticed that the pulses from an FXO on an Adtran 750
channel bank are rather irregular-sounding, and also sound like they
have an improper break/make ratio. If you need to pulse dial into a
step switch, I suggest using either a TDM400P or X100P card!
First, you need to unpack Zaptel. You should be logged in as root and use the following commands:
cd /usr/src
tar xvfz /path/to/download/zaptel-1.2.16.tar.gz
tar xvfz /path/to/download/asterisk-1.2.17.tar.gz
cd zaptel-1.2.16
patch -p1 < /path/to/download/zaptel-1.2.13-cnet4.patch
make
make install
cd ../asterisk-1.2.17
patch -p1 < /path/to/download/asterisk-1.2.16-cnet.patch
make
make install
An explanation of the commands:
- cd /usr/src sets your
current directory to /usr/src
(which is a good place to put source code).
- The tar commands unpack
the Zaptel and Asterisk tarballs; think of them as .ZIP files, but they
are a different format.
- Since you are already in /usr/src,
the cd zaptel-1.2.15 command
will change your current directory to /usr/src/zaptel-1.2.15
(which is where you should be).
- The first patch command
applies the Zaptel patch to the Zaptel source code. Basically, the
patch file contains differences between my modified Zaptel and the
box-stock version, and the command modifies the original code to turn
it into my version.
- make without any
parameters applies the default rule in the Makefile - which builds the Zaptel
drivers.
- make install applies the install rule written in the
Makefile - which installs
the drivers into their location within the current Linux kernel tree.
- cd ../asterisk-1.2.16
changes your current working directory to /usr/src/asterisk-1.2.16 (which is
where you need to be to patch and build Asterisk).
- The second patch command
applies my changes to the Asterisk source code.
- As before, make and make install will build and install
Asterisk, respectively.
Now, you will need to modify the /etc/zaptel.conf
file. In particular, you will need to add:
hearpulsing=<channel list>
with a list of channels where you want the open audio path. For
instance, if you had FXOs on channels 1 and 2, hearpulsing=1-2 would work.
If you had FXOs on channels 6,7,8,9, and 25, then hearpulsing=6-9,25 would be
appropriate option to use.
You then need to modify /etc/asterisk/zapata.conf
as well. You
will need to find the place where you are setting the FXO parameters,
and add:
hearpulsing=yes
BEFORE the "channel => x" statements. For instance, following
the example of channels 1 and 2 being your FXOs:
; other parameters for FXO ports precede this
signalling=fxs_ks ; fxs_ls might be needed in some circumstances
hearpulsing=yes
channel => 1
channel => 2
Once this is done, you should restart the system (rebooting is one way
to do it, or you could shut down Asterisk, unload the old Zaptel
modules, load the new modules, and restart Asterisk).