Setting up TDM400 - 3FXS+1FXO port in PiaF - I'm clueless now

HI,

Got a clone of a TDM400 with 3fxs and 1fxo port. Reinstalled PiaF 1.3 from scratch. The card is detected fine, however, the more I read about configuration, the more confused I get.

Can anyone please give me outline steps atleast on which files need to be modified and how much (cos on some, the header states do not hand edit, but instructions from various folks on various forums actually ask to edit those files), for a FXO port, if from-zaptel context is defined, does FreePBX auto create that context, or, do I manually need to add a context in one of the extensions files?.

Any/All help would be highly appreciated.

RIz

Without knowing exactly which files you are referring to it’s hard to help.

But yes you should NOT in general edit any file that does not have _custom in it’s name. There are exceptions to the rules (aren’t there always…), But clearly you don’t want to edit the _additional.conf file as those are regenerated every time you make a change.

If you have run the genzaptelconf routine that re-generates the zaptel.conf file. If you run it again it will change that file again. But you can and do sometimes need to change things in that file that are a part of the general setup of the card. Past that each zaptel channel should have it’s own zapata_custom_chan_xx.conf (where xx is the channel number) that allows you to override what ever you need.

But both PiaF and trixbox have a xxx without tears (or tears 2) manual which is what should be followed. (They are interchangeable for the zaptel setup part and many other basic setup parts.

OK, Three re-installs later, things have definitely moved along - PiaF w/o tears did indeed help. Now, Caller ID on calls to my POTS line gets recognised by FreePBX, the correct CallerID shows in CDR Reports. However, this Caller never gets passed onto any of the 3 phones connected to the fxs ports of the same card. Calls to any VoIP trunk DIDs exhibit the same behaviour - callerID appears in FreePBX CDR reports, but doesn’t show on the phones. I read Philippe helping someone by asking them to remove duplicated entries in zap* files. I have three that could be of interest:

Zapata_additional.conf - Automaitcally created by FreePBX.


;--------------------------------------------------------------------------------;
; 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 ;
;--------------------------------------------------------------------------------;
;

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

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

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

and then

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
cidsignalling=v23
cidstart=polarity
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=3.0
txgain=3.0
group=0
callgroup=1
pickupgroup=1
immediate=no
channel =>1
;signalling = fxo_ks
;context=from-internal
;channel =>2-4

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

;Include genzaptelconf configs
;#include zapata-channels.conf <==I’ve commented out the include to this

;Include AMP configs
#include zapata_additional.conf

and then zapata-channels.conf

; Autogenerated by /usr/local/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=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
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=fxo_ks
callerid=“Channel 3” <6003>
mailbox=6003
group=5
context=from-internal
channel => 3
callerid=
mailbox=
group=
context=default

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

This seems to be re-defining the ZAP extensions I had definsed thru FreePBX, so I actually commented out the Include to this in zapata.conf.

and lastly,

zapata-auto.conf

; Autogenerated by /usr/local/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 ; callerid=asreceived

; Span 1: WCTDM/0 “Wildcard TDM400P REV I Board 1” (MASTER)
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=from-zaptel
group=0
channel => 1

signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 2
context=from-internal
group=1
channel => 2

signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 3
context=from-internal
group=1
channel => 3

signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 4
context=from-internal
group=1
channel => 4

Can anyone decipher this jumbled up maze for me please?.

zapata.conf calls zapata_channels.conf and zapata_additional.conf and they are NEEDED as they were defined. So remove the comment that you added as it’s counter productive to what you want and making the system right.

At the same time the context for your line in has to be from-zaptel not from-psdn for this to work (read the page in the admin for Zap Channel DID’s and chagne it in the zapata-channels.conf file). Once you have changed that you’ll need to reboot (or unload and reload all the zaptel drivers), Linux geeks know how to do this easy but a reboot does it also.

FYI: when you use the code format to post here it skips all htlp coding checks so your referances don’t work and make it harder to read.

Thanks for the reply fsk.

The context for the FXO port is actually defined as from-zaptel in Zapata.conf, from-pstn is defined in zapata-channels.conf, the include to which I had commented out in zapata.conf. I’ve played around a bit more, and now things seem to be working!!!. Extensions get caller ID. The files as they are now:

zapata_additional.conf: Don’t think anything is changed in this one:
;--------------------------------------------------------------------------------;
; 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 ;
;--------------------------------------------------------------------------------;
;

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

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

;;;;;;[504]
signalling=fxo_ks
pickupgroup=
mailbox=504@device
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <504>
busydetect=no
busycount=7
accountcode=
channel=>4
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
cidsignalling=v23
cidstart=polarity
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=3.0
txgain=3.0
group=0
callgroup=1
pickupgroup=1
immediate=no
channel =>1
;signalling = fxo_ks
;context=from-internal
;channel =>2-4

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

;Include genzaptelconf configs
;#include zapata-channels.conf

;Include AMP configs
#include zapata_additional.conf

Systems seems workable now.