PBX in a Flash for Newbies

Configuring and Testing Zaptel Hardware


Configuring and Testing Zaptel Hardware

Part 3 - Asterisk Zapata Interface

This is the continuation of Part 2 - Zaptel Drivers

The order of loading of conf files for the Zapata interface is:

  1. /etc/asterisk/zapata.conf

    This file holds global configurations and may contain "includes" to the following zapata conf files. There doesn't appear to be a "standard" install for zapata conf files. It seems to change depending on the version of Asterisk that you have.

    1. /etc/asterisk/zapata-auto.conf

      This is auto generated by genzapconf and will contain the FXS/FXO channel information.

    2. /etc/asterisk/zapata-additional.conf

      This conf contains the FXS extensions information created by FreePBX.

    3. /etc/asterisk/zapata_custom.conf

      This is manually created by you for FXO and E1/T1 trunks

You may have to put them in the correct order by editing zapata.conf. Sometimes genzapconf will generate arbitrary extensions in zapata-auto.conf. Again it depends on your version of Asterisk and Zaptel.

/etc/asterisk/zapata.conf

This file holds global configurations and may contain "includes" to the following zapata conf files. Here's an example of a zapata.conf.

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300		; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf     <= this is added by genzapconf



;Include AMP configs
#include zapata_additional.conf <= the # is part of the command
#include zapata_custom.conf     <= may have to add this line in

/etc/asterisk/zapata-auto.conf

The file /etc/asterisk/zapata-auto.conf is auto generated by genzapconf interface between the Linux operating system and the Asterisk PBX server. It shows Asterisk how to identify the Zaptel ports and what the signalling should be to communicate with the device connected to the port. You do not edit this file for most FXS/FXO cards as it is automatically generated by the genzapconf program. For T1 cards, you may have to manually edit /etc/asterisk/zapata-additional.conf. You can view /etc/asterisk/zapata-auto.conf by typing at the Linux prompt:

root@pbx~$ nano /etc/asterisk/zapata-auto.conf

Here's zapata-auto.conf for an Asterisk server that has a TDM400P card (3 FXS and 1 FXO ports):

It shows the signaling for each port. Notice that the signaling coming out of the port is the exact opposite of the signaling device that is connected to it. It shows the group and channel assigned to each port.

/etc/asterisk/zapata_additional.conf

This conf contains two FXS extensions created through the FreePBX GUI.

 ;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at: http://freepbx.org/configuration_files       ;
;--------------------------------------------------------------------------------;
;

;;;;;;[1001]
signalling=fxo_ks
pickupgroup=
mailbox=1001@device
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <1001>
busydetect=no
busycount=7
accountcode=
channel=>1

;;;;;;[1002]
signalling=fxo_ks
pickupgroup=
mailbox=1002@default
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <1002>
busydetect=no
busycount=7
accountcode=
channel=>2
 

lszaptel

Another tool is the lszaptel command. It shows the zaptel cards and channels, the following snapshot shows that Span 1 is a 4 channel TDM card and Span 2 is a TE110P T1/E1 card - channels 5-27 are B channels (data) with channel 28 being the D channel (control) channel:

Checking if the Zaptel modules are recognized by Asterisk

You can check to see if Asterisk recognizes the Zaptel modules by typing the following at the Asterisk prompt:

pbx*CLI> help

At the end of the help listing, you should see the zap commands.

ZapHelp.JPG

At the Asterisk CLI, run the "zap show channels" command. It will show you the configured channels:

In the above example, you can't tell but channel 1-4 are from a TDM400P card, 5 to 10 are from a T1 line connected to a channel bank.

Important - the channels that have "from-internal" are FXS ports and the ones with "from-zaptel" are FXO ports.

Now you are ready to add an FXS extension!

No Zap Help Files?

If Asterisk is running and you can't see the zap help commands, it means that there is a misconfiguration between /etc/zaptel.conf and the hardware. Go visit the No Asterisk Zap Help page to troubleshoot.

Poor Performance or Flaky Audio?

It could be a PCI bus problem. Over at www.voip-info.org, they have a great article on testing your Zaptel cards for performance and troubleshooting PCI bus problems.

If this page has helped you, consider donating to cover the cost of hosting this site. Thanks


Sponsored by

TelecomWorld.ca

The VoIP Resource Center

Sponsored by

TelecomWorld.ca

The VoIP Resource Center