Compile/install Zaptel and Asterisk

cd /usr/src/zaptel
make clean
./configure; make menuselect
At menu press "x"
make; make install

cd /usr/src/asterisk-1.4.x
make clean
./configure; make menuselect
select core sounds and uncheck all except ulaw.  Same with addon sounds
At menu press "x" to save

make; make install
mkdir /var/run/asterisk
mkdir /var/lib/asterisk/sounds
mkdir /var/lib/asterisk/sounds/custom
cp -rv /usr/src/sounds/* /var/lib/asterisk/sounds

edit zaptel.conf for “fxsks=1-8” for 8 fxo channels (fxs channels for fxo ports and visa versa)
nano /etc/zaptel.conf

loadzone = us
defaultzone = us
fxsks = 1-8


Those are the ONLY lines required in zaptel.conf.  Everything else should be commented out (“;”) or deleted.
Create a zapata.conf file in /etc/asterisk with the following for 8 fxo ports

nano /etc/asterisk/zapata.conf

;# Flash Operator Panel will parse this file for zap trunk buttons
;# AMPLABEL will be used for the display labels on the buttons
;# %c Zap Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n
;# For Zap/* buttons use the following
;# (where x=number of buttons to dislpay)

;include zap extensions defined in AMP
#include zapata_additional.conf
AMPLABEL:Channel %c - Button %n
context = from-pstn
switchtype = national
usecallerid = yes
echocancel = yes
echocancelwhenbridged = yes

;add the is option if you are problems with DTMF detection
relaxdtmf = yes 

rxgain = 12.0
txgain = -3.0

;The following is for fxo ports only
signalling = fxs_ks
group = 0
channel => 1-8


Those are the ONLY lines required in zapata.conf.  Everything else should be commented out (“;”) or deleted.
If you have, for example, 2 FXS ports and 2 FXO ports then change "context=from-pstn" to "context=default" and add the following to zapata.conf after the gain.

signalling = fxs_ks
channel => 1-2

signalling = fxo_ks
channel => 3-4

/usr/sbin/wancfg zaptel

If autoconfig does not work just go through menus

Create new wanpipe1.conf file
Detect card
Enable TDM Voice, Hardware Echo, SPAN 1