Need Help with simple dial plan for 4 port TDM400P

Hello all
I am new to Asterisk,
I have a 4 FXS port TDM400P card in a linux box that I’d like to configure as four extensions that can call each other.
It uses dahdi and linux kernel module wctdm which all appear to be working. When I modprobe wctdm the leds on the FXS ports all turn green which is a good sign.
the command lsdahdi gives me:

Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)

1 FXS FXOKS (In use)
2 FXS FXOKS (In use)
3 FXS FXOKS (In use)
4 FXS FXOKS (In use)

and
dahdi_scan -vvvvv gives me:
[1]
active=yes
alarms=OK
description=Wildcard TDM400P REV I Board 5
name=WCTDM/4
manufacturer=Digium
devicetype=Wildcard TDM400P REV I
location=PCI Bus 02 Slot 01
basechan=1
totchans=4
irq=0
type=analog
port=1,FXS
port=2,FXS
port=3,FXS
port=4,FXS

I got a auto generated dahdi-channels.conf:
cat dahdi-channels.conf
; Autogenerated by /usr/bin/dahdi_genconf on Wed Oct 30 02:19:16 2024
; If you edit this file and execute /usr/bin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 “Wildcard TDM400P REV I Board 5” (MASTER)
;;; line=“1 WCTDM/4/0 FXOKS”
signalling=fxo_ks
callerid=“Channel 1” <4001>
mailbox=4001
group=5
context=from-internal
channel => 1
callerid=
mailbox=
group=
context=default

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

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

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

I have been reading the basic docs
Hello World - Asterisk Documentation
and created an extensions.conf where dialing 9 should play hello world, and the extensions are 0 ,1,5 & 6:

exten => 0,1,Dial(DAHDI/1,r2)
exten => 9,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
exten => 1,1,Dial(DAHDI/2,r1)
exten => 5,1,Dial(DAHDI/3,r1)
exten => 6,1,Dial(DAHDI/4,r1)

and added a #include for it in
chan_dahdi.conf:
#include dahdi-channels.conf

However when I pick up one of the phones I don’t here dial tone and I cant call the other phones.
I can here my self and I the touchtone buttons work.
What else do I need to set up my FXS ports so that they can call each other?
Thanks in advance!

r1 is not a valid number of seconds; have you missed a comma?

I think you have to set an option to cause Asterisk to automatically do the equivalent of Background with dialtone, and WaitExten. I thought it was something like simple pabx, but I can’t find it.

In any case, with the right logging you should see “No extension s” as an error, in the logs, if this is the problem.

Thanks for taking a look I updated my extensions.conf like so:
[from-internal]

exten => 0,1,Dial(DAHDI/1r2,45)
exten => 9,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
exten => 1,1,Dial(DAHDI/2r1,30)
exten => 5,1,Dial(DAHDI/3r1,30)
exten => 6,1,Dial(DAHDI/4r1,30)

No Dial Tone is a problem. Does the card have a Power Connector on the back edge? a Molex Connector. And did you connect Power to it?

Yes it has a molex power connector and when the computer boots lspci detects the card but its dark until I load the wctdm kernel module
modprobe wctdm
After that the green leds on the four RJ11 ports light up, and when I plug in a phone I here myself in the phone and the dial pad works, so the card is putting out ‘battery’.
Is there a way to poke the card directly thru dahdi (without asterisk) to see if its a hardware or software issue?
lsdahdi gives me:

### Span  1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) 
  1 FXS        FXOKS       (In use)  
  2 FXS        FXOKS       (In use)  
  3 FXS        FXOKS       (In use)  
  4 FXS        FXOKS       (In use)

thanks for your feedback and support.

What does dahdi_cfg -d -vvv show? And from the Asterisk prompt dahdi show channels

DAHDI Tools Version - 3.4.0
Line 9: fxoks=1
Line 10: echocanceller=mg2,1
Line 11: fxoks=2
Line 12: echocanceller=mg2,2
Line 13: fxoks=3
Line 14: echocanceller=mg2,3
Line 15: fxoks=4
Line 16: echocanceller=mg2,4
Line 20: loadzone       = us
Line 21: defaultzone    = us
<End of File>

DAHDI Version: 3.4.0
Echo Canceller(s): MG2
Configuration
======================


Channel map:

Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)

4 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2

Thank you for your assistance and support

Did that get you going? What happened when you did the4 Asterisk command

dahdi show channels

dahdi show channels gives me:

 Chan Span Signalling           Extension  Context         Language MOH Interpret        Blocked    In Service Alarms       Description
 pseudo    0 Pseudo                          default                  default                         Yes        No Alarm
      1    1 FXO Kewlstart                   from-internal            default                         Yes        No Alarm
      2    1 FXO Kewlstart                   from-internal            default                         Yes        No Alarm
      3    1 FXO Kewlstart                   from-internal            default                         Yes        No Alarm
      4    1 FXO Kewlstart                   from-internal            default                         Yes        No Alarm

Sill no dial tone. All I configured is an extensions.conf and a dahdi-channels.conf do I need anything else ? thank you

Well, we checked to power connector (the Molex connector), the lights on the back of the card came on when you did the modprobe, dahdi_cfg ran with no errors and the channrls showed up in the Asterisk dahdi show channels. So the only other thing that I can think of is that the TDM400P is defective.

Since this is my first asterisk install I am suspicious of user error. I’ll voltage rails on the molex and look for obvious issues on the card like bad caps.
Thanks for your feedback.