Understanding Zapata.conf

I recently loaded asterisk and got the SIP side of things going. Ordered a TE110P and TDM400P (with one FXS channel) and loaded those in the box. Now I need to fire up the system and get it ready to accept a T1 e&m Wink

When I get to the Zapata.conf, something just doesn’t click in my head. How to I tell it which card I’m talking about? I’m going to have a 4 line trunk group (for in and outbound traffic) on the T1 card and then use the TDM400P for modem based outbound calling.

I just can’t reason out how to tell Asterisk about this in the conf file.

The drivers are loaded, zttool shows me the cards, I’ve got the “hard” part done…

Mark Jones

Well, it turns out to be quite simple actually, it helps to have access to sleep, and to the lines are you are attempting to use while setting this up.

So, a T1 terminating into a TE110P and an Analog phone plugged into a TDM10B. How do we do that?

Well, we start by setting up the channels in the /etc/Zaptel.conf.

span=1,1,0,esf,b8zs
e&m=1-24
fxoks=25

Then we run ztcfg which magically makes this work with the hardware.

Once that is done we have 25 channels known as Zap/1 thru Zap/25

Next we have to configure /etc/asterisk/zapata.conf

context=incoming-pstn
group=2
signalling=em_w
channel=> 1-24

group=
context=default
signalling=fxo_ks
channel=25

Zap/25 can’t be dialed out on, it is an internal phone, so we clear out the group on this line. Then, when we want to dial out on our t1, we can say Zap/G2 or Zap/g2 and it will dial out using the outbound lines only.

[default] is the dialplan context all our internal extensions start on
[incoming-pstn] is the dialplan context the phone company lines ring on.

It’s really that simple.

  1. Define the Channels that Asterisk will use in /etc/zaptel.conf
  2. Group the channels together to allow using them as a group in /etc/asterisk/zapata.conf
  3. Use them in your dialplan