[Asterisk-Users] TDM400P + FXO module = PSTN woes

Rich Adamson radamson at routers.com
Fri Nov 11 05:23:11 MST 2005


> I have installed Asterisk 1.0.9 on FC3. I have recently installed a Digium
> TDM400P and a red Digium FXO module, which I hope to connect to the PSTN so
> I can make outbound calls. The FXO card is installed in port 1, and the
> telephone jack is inserted into port 1. 
> 
> No matter how I try, I cannot get Asterisk to dial out. Please could someone
> point me in the right direction. 
> 
> Here are a bit of information on how my system is configured: 
> 
> /proc/interrupts 
> cat /proc/interrupts 
> CPU0 
> 0: 	536844 XT-PIC timer 
> 1: 	8 XT-PIC i8042 
> 2: 	0 XT-PIC cascade 
> 3: 	0 XT-PIC ehci_hcd:usb1 
> 4: 	0 XT-PIC ohci_hcd:usb3 
> 8: 	1 XT-PIC rtc 
> 9: 	0 XT-PIC acpi, ohci_hcd:usb2 
> 10: 	504097 XT-PIC wctdm 
> 11: 	2963 XT-PIC eth0 
> 12: 	110 XT-PIC i8042 
> 14: 	4313 XT-PIC ide0 
> NMI: 0 
> ERR: 0 
> 
> /etc/zaptel.conf 
> fxsks=1 
> loadzone=za 
> defaultzone=za 
> 
> /etc/asterisk/zapata.conf 
> [channels] 
> language=en 
> immediate=no 
> context=default 
> usecallerid=yes 
> callprogress=no 
> 
> transfer=yes 
> threewaycalling=yes 
> callwaitingcallerid=yes 
> callwaiting=yes 
> cancallforward=yes 
> 
> musiconhold=default 
> pridialplan = local 
> prilocaldialplan = local 
> nationalprefix = 0 
> internationalprefix = 00 
> 
> ;Echo control 
> echocancel=yes 
> echotraining=yes 
> echocancelwhenbridged=yes 
> 
> ;Adjust Volume 
> rxgain=0.0 
> txgain=0.0 
> 
> ; This is for the FXS Digium card 
> signalling=fxs_ks 
> echocancel=yes 
> echocancelwhenbridged=yes 
> echotraining=400 
> callerid=asreceived 
> group=1 
> context=default 
> channel => 1 
> 
> /etc/asterisk/extensions.conf 
> [general] 
> static=no 
> writeprotect=no 
> 
> [globals] 
> TRUNK=Zap/1 
> 
> include => daytime|9:00-17:00|mon-fri|*|* 
> 
> [local] 
> ignorepat => 0 
> include => sip 
> 
> [default] 
> include => sip 
> 
> exten => _X.,1,wait(1) 
> exten => _X.,2,Answer() 
> exten => _X.,3,Goto(default,s,1) 
> 
> exten => s,1,Answer() 
> exten => s,2,NoOp(${CALLERID}) 
> exten => s,3,Goto(sip,2100,1) 
> 
> exten => t,1,Goto(default,s,4) 
> exten => i,1,Playback(invalid) 
> 
> [sip] 
> exten => 2100,1,Answer 
> exten => 2100,2,wait(1) 
> exten => 2100,3,Dial(SIP/2101,20,tr) 
> exten => 2100,4,Voicemail(u2100) 
> exten => 2100,103,Voicemail(b2100) 
> exten => 2100,104,hangup 
> 
> exten => 2101,1,Answer 
> exten => 2101,2,wait(1) 
> exten => 2101,3,Dial(SIP/2101,20,tr) 
> exten => 2101,4,Voicemail(u2101) 
> exten => 2101,102,Voicemail(b2101) 
> exten => 2101,103,hangup 
> 
> ; This is where we handle the outgoing calls 
> exten => _0.,1,Dial(${TRUNK}/${EXTEN:1},70,T,t) 
> exten => _0.,2,Hangup 
> 
> Now because ZAPTEL moans on boot-up, I have removed ZAPTEL from the startup
> services and edited my /etc/rc.d/rc.local file to load everything. 
> 
> /etc/rc.d/rc.local 
> #!/bin/sh 
> # 
> # This script will be executed *after* all the other init scripts. 
> # You can put your own initialization stuff in here if you don't 
> # want to do the full Sys V style init stuff. 
> 
> touch /var/lock/subsys/local 
> 
> /sbin/modprobe zaptel 
> /sbin/modprobe wctdm ; I have also tried wcfxs
> /sbin/service zaptel start 
> 
> sleep 1 
> /sbin/service asterisk start 
> sleep 1 
> 
> lsmod 
> Module		Size		Used by 
> wcfxs 		32288 		0 
> zaptel 		208388 	1 wcfxs 
> md5 		4033 		1 
> ipv6 		262977 	10 
> autofs4 	28229 		0 
> dm_mod 	57333 		0 
> video 		15685 		0 
> button 		6609 		0 
> battery 		9285 		0 
> ac 		4805 		0 
> ohci_hcd 	26081 		0 
> ehci_hcd 	40013 		0 
> i2c_sis96x 	5445 		0 
> i2c_core 	21313 		1 i2c_sis96x 
> hisax 		598301 	0 
> crc_ccitt 	2113 		2 zaptel,hisax 
> isdn 		148673 	1 hisax 
> slhc 		6849 		1 isdn 
> r8169 		29005 		0 
> ext3 		130633 	2 
> jbd 		83161 		1 ext3 
> 
> Now Asterisk starts up fine, and when I dial, using X-Ten Lite, Asterisk
> shows that it is dialling the ZAP/1, but the number I am dialling never
> rings. 
> 
> I am probably doing something stupid, so if anyone can shed some light, I
> will appreciate it.

Based on what you are showing above, the
 lsmod 
 Module		Size		Used by 
 wcfxs 		32288 		0 
 zaptel 		208388 	1 wcfxs 

does not make sense. Your script does /sbin/modprobe wctdm, but the lsmod
shows wcfxs.  The wctdm driver _is_ required for the red fxo module to 
function, and the wcfxs is associated with the green fxs module. It would
appear your problem is associated with this driver load stuff.

Do the modprobes by had (not a script) and watch the results. If I do
a 'modprobe zaptel' followed by a 'modprobe wctdm', I see:
Module                  Size  Used by
wctdm                  33728  0
zaptel                209540  1 wctdm

indicating the zaptel driver is used by one wctdm driver.

The do a 'ztcfg -vv' and you should see something like:
Zaptel Configuration
======================
Channel map:
Channel 01: FXS Kewlstart (Default) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)
4 channels configured.

(The above is for a TDM card with four fxo modules installed.)

If you don't see something like this, then resolve that before you do
anything with the asterisk application.

Once the above is loading correctly, run zttool to see if any issues
are displayed. If everything looks okay at that point, then start
asterisk using something like 'asterisk -cvvvvdddd' and scan back
over the hundreds of lines of output looking for errors.

If you still have problems loading wctdm, you might take a look at
the output from 'dmesg' and look for the line that says:
 Found a Wildcard TDM: Wildcard TDM400P REV H (4 modules)

If the revision number of your TDM card is 'H', 'I', etc, (a later
version of the card), then consider updating the asterisk/zaptel
code to something later then v1.0.9 as that old of code did not have the
pci numbers in it to recognize the newer TDM card revisions.

One way or another, you "have to" get wctdm to load properly before the
fxo module is going to function properly.

Assuming you still have problems with the above, then give us a clue
which distro your using, TDM card revision, output from 'ztcfg -vv',
etc.





More information about the asterisk-users mailing list