ZAP configuration

Hi there,
I’ve done my best with trixbox and all is working fine but I’m stuck with the ZAP parameters.
I can’t make and receive calls using ZAP channels.
I thing I’m pretty close to the solution and I need and expert eye to find out where I’m wrong.
Actually, it is even worse : when I’m placing a call using a zap trunk it rings on the analog phone on the channel 1 !!!
What could I change to make it work properly ?
Any suggestion is good for me…
Thanks in advance !

Here is my configuration :
2 SIP accounts and 4 softphones, working very well !
Digium TDM400 2FXO 2FXS :

  • 1 analog phones on channel 1 (FXS)
  • 2 pstn lines on channels 3 & 4 (FXO)
  • 2 trunks (1 for each pstn line) : zap/3 et zap/4
  • 1 inbound route “any CID / any DID”
  • 2 inbound routes : 1 for each zap trunk (do I have to ?)

*** zapata-auto.conf ***
; Autogenerated by /usr/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1” (MASTER)
;;; line="1 WCTDM/0/0"
signalling=fxo_ks
callerid=“Channel 1” <6001>
mailbox=6001
group=5
context=from-internal
channel => 1
callerid=
mailbox=
group=
context=default

;;; line="2 WCTDM/0/1"
signalling=fxo_ks
callerid=“Channel 2” <6002>
mailbox=6002
group=5
context=from-internal
channel => 2
callerid=
mailbox=
group=
context=default

;;; line="3 WCTDM/0/2"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 3
context=from-zaptel **(I changed from “default” to this value)

;;; line="4 WCTDM/0/3"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 4
context=from-zaptel **(I changed from “default” to this value)

; Span 2: ZTDUMMY/1 “ZTDUMMY/1 (source: RTC) 1”


*** zapata.conf ***
;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

busydetect=yes
busycount=6
language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300
;
; 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=4.0
txgain=2.0
group=0
callgroup=1
pickupgroup=1
immediate=no

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

;Include genzaptelconf configs
#include zapata-auto.conf

group=0 **(what does this refer to ?)

;Include AMP configs
#include zapata_additional.conf


*** zapatal_additional.conf ***
;;;;;;[110]
signalling=fxo_ks
record_out=Adhoc
record_in=Adhoc
[email protected]
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
dial=ZAP/1
context=from-internal
callprogress=no
callerid=device <110>
busydetect=no
busycount=7
accountcode=
channel=>1

You have your connections flipped on the card for port 1-4. If when you attempt to dial out your analog phone rings then the most common mistake is that phone is plugged into the trunk port. Flip your connections around.