Help with TDM400P, Ast 1.4.24 and FreePBX 2.5.1.2

Hi folks,

I have the following setup:
Asterisk 1.4.24
dahdi-linux (2008-11-02)
FreePBX 2.5.1.2
Centos 5.2
A Digium TDM400P

The system is working fine for making SIP calls but I’ve not yet figured out how to talk to the TDM400P. Since it cost us $400 to buy, I have the boss on my back to make it work :slight_smile: I have a handset plugged into the first port. I have no PSTN connected at this time.

dahdi-linux (and tools) seems to be correctly installed and working. On boot up, I get a number of green lights as modules are installed. On the Asterisk CLI a “dahdi show status” reports a Wildcard TDM400P REV 1 Board 5. A “dahdi show channels” gives a header row but no further info. This seems reasonable to me if there are no active channels.

I have included below two relevant documents. The dahdi-channel.conf and my current extension profile from FreePBX. The conf is auto-generated. I have tried several different values in the Extension profile but haven’t had success yet.

I would appreciate some advice on what values to punch into the extension profile in order to make these lines in and out work OK. And/or any further info on anything else I’m missing. I’ve googled extensively but there seems to be a dearth of documentation on how to configure FreePBX 2.5 for use with DAHDI (vs the older ZAP branded software). Naturally once I get this working, I will publish my findings for all to enjoy :slight_smile:

Thanks,
Sean

/etc/asterisk/dahdi-channel.conf
—tear here
; Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)
;;; line="1 WCTDM/4/0"
signalling=fxo_ls
callerid=“Channel 1” <4001>
mailbox=4001
group=5
context=from-internal
channel => 1
callerid=
mailbox=
group=
context=default

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

;;; line="3 WCTDM/4/2"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default

;;; line="4 WCTDM/4/3"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 4
callerid=
group=
context=default
—tear here

Ext 100 page from FreePBX
— tear here
Device Options
This device uses zap technology. (Via DAHDI compatibility mode)
channel 1
context from-internal
immediate no
signalling fxo_ls
echocancel yes
echocancelwhenbridged no
echotraining 800
busydetect no
busycount 7
callprogress no
dial ZAP/1 (have also tried DAHDI/1)
accountcode (blank)
callgroup 5
pickupgroup (blank)
mailbox 4001@device
— tear here

So that you know FreePBX does support Dadhi, but getting it working is actually a Asterisk issue and not a FreePBX issue. So searching FreePBX for all the answers might not be the best solution. If asterisk can’t see it then FreePBX which queries asterisk about what is available will not know about it.

You are not providing several of the needed Dahdi config files that are important for somebody to help out. To start with we need to see /etc/asterisk/chan_dahdi.conf and /etc/dahdi/system.conf and all referenced #include files.

also use the dahdi_cfg command to verify that it see’s the channels configured properly because if it can’t see them then nothing else upstream will to start.

Thanks for your reply. I think that Asterisk is seeing the DAHDI system OK but I’m not sure. I’ve not been able to find an example of what a working one looks like. This is what I see in the Asterisk CLI. Is this expected? My TDM400P has 2 FXS and 2 FXO ports.

I will cross-post this to the digium forums now to establish if the CLI reports are looking OK but I’d certainly appreciate if you have any suggestions.

Thanks,
Sean

asterisk*CLI> dahdi show status
Description                              Alarms     IRQ        bpviol     CRC4      
Wildcard TDM400P REV I Board 5           OK         0          0          0         
asterisk*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret       
 pseudo            default                    default             
asterisk*CLI> 

Here is my chan_dadi.conf (trimmed of comments for brevity)

[trunkgroups]
;
[channels]
context=default
switchtype=national
signalling=fxo_ls
rxwink=300		; Atlas seems to use long (250ms) winks
distinctiveringaftercid=yes	; enable dring detection after callerid for those countries like Australia
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
sendcalleridafter=1
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
include chan_dahdi_additional.conf

And the include…

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

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

And the /etc/dahdi/system.conf

# Autogenerated by /usr/sbin/dahdi_genconf on Tue Mar 24 00:13:03 2009 -- do not hand edit
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) 
fxols=1
echocanceller=mg2,1
fxols=2
echocanceller=mg2,2
fxsks=3
echocanceller=mg2,3
fxsks=4
echocanceller=mg2,4

# Global data

loadzone	= us
defaultzone	= us

your show channels does not look right. It should show each channel as a line.

   Chan Extension  Context         Language   MusicOnHold         
 pseudo            from-internal   en                             
      1            from-internal   en                             
      2            from-internal   en                             
      3            from-internal   en                             
      4            from-pstn       en                             

I don’t have access to a dahdi box currently but but dahdi_cfg -vv or is it -vvv shoud get youa output showing the status for each line.

Something like this:

Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

Ah, I see. Thank you. I’ve now cross-posted to the Asterisk forum. I have to head off to a client for now but will check in later.