chan_zap doesn't find my TDM card


#1

Hi,
I just install a brand new TDMcard with one FXO and one FXS in my PC.
zaptel 1.2.5 seems to find it correctly (below log of modules in debug).

But not Asterisk (see log below).

My pc is a P4 1.8 doing firewall, mythtv and perhaps asterisk, running ubuntu breezy with an kernel 2.6.16.11 from kernel.org.

Please help.

Thanks.

Ztcfg too.

[4296246.926000] Zapata Telephony Interface Registered on major 196
[4296246.926000] Zaptel Version: 1.2.5 Echo Canceller: KB1
[4296270.286000] ACPI: PCI Interrupt 0000:02:0c.0[A] -> GSI 20 (level, low) -> IRQ 217
[4296270.302000] Registered Span 1 (‘WCTDM/0’) with 4 channels
[4296270.302000] Span (‘WCTDM/0’) is new master
[4296270.302000] Freshmaker version: 73
[4296270.303000] Freshmaker passed register test
[4296270.803000] ProSLIC on module 0, product 0, version 0
[4296270.803000] Module 0: Not installed
[4296270.803000] ProSLIC on module 1, product 0, version 2
[4296270.803000] ProSLIC on module 1 seems sane.
[4296270.817000] ProSLIC on module 1 powered up to -72 volts (c1) in 8 ms
[4296270.817000] Loop current set to 20mA!
[4296271.317000] Post-leakage voltage: 32 volts
[4296271.323000] ProSLIC on module 1 powered up to -75 volts (ca) in 6 ms
[4296271.323000] Loop current set to 20mA!
[4296271.681000] Calibration Vector Regs 98 - 107:
[4296271.681000] 98: 10
[4296271.681000] 99: 10
[4296271.681000] 100: 10
[4296271.681000] 101: 0e
[4296271.681000] 102: 01
[4296271.681000] 103: 25
[4296271.681000] 104: 09
[4296271.681000] 105: d7
[4296271.681000] 106: 20
[4296271.681000] 107: 08
[4296271.689000] Init Indirect Registers completed successfully.
[4296271.689000] Proslic module 1 loop current is 20mA
[4296271.689000] Module 1: Installed – AUTO FXS/DPO
[4296271.689000] ProSLIC on module 2, product 0, version 0
[4296271.689000] Module 2: Not installed
[4296271.689000] ProSLIC on module 3, product 0, version 0
[4296271.689000] VoiceDAA System: 04
[4296271.890000] ISO-Cap is now up, line side: 03 rev 03
[4296271.890000] Module 3: Installed – AUTO FXO (FCC mode)
[4296271.953000] Found a Wildcard TDM: Wildcard TDM400P REV I (2 modules)
[4296271.968000] NO BATTERY on 1/4!
[4296337.622000] Registered tone zone 0 (United States / North America)

Zaptel Configuration

Channel map:

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

2 channels configured.

zaptel.conf :
fxsks=1
fxoks=3
loadzone = us
defaultzone=us

[chan_zap.so] => (Zapata Telephony)
== Parsing ‘/etc/asterisk/zapata.conf’: Found
May 5 08:16:15 WARNING[23516]: chan_zap.c:923 zt_open: Unable to specify channel 1: No such device
May 5 08:16:15 ERROR[23516]: chan_zap.c:6878 mkintf: Unable to open channel 1: No such device
here = 0, tmp->channel = 1, channel = 1
May 5 08:16:15 ERROR[23516]: chan_zap.c:10314 setup_zap: Unable to register channel '1’
May 5 08:16:15 WARNING[23516]: loader.c:414 __load_resource: chan_zap.so: load_module failed, returning -1
May 5 08:16:15 WARNING[23516]: loader.c:554 load_modules: Loading module chan_zap.so failed!

zapata.conf :
[channels]
echocancel=yes
echocancelwhenbridged=yes
echotraining=400
callerid=13611603
;signalling=fxo_ls
;group=1
;context=default
;channel => 3

signalling=fxs_ls
callerid=asreceived
group=2
context=incoming
channel => 1


#2

I think you have the wrong signaling specified in your zapata.conf file.

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

[i]signalling=fxs_ls
callerid=asreceived
group=2
context=incoming
channel => 1

signalling=fxo_ls
group=1
context=default
channel => 3[/i]

For FXO channels you have to use FXS signalling, and for FXS channels you have to use FXO signalling. It seems wierd at first, but that’s how it works. Try…

signalling=fxo_ls ; not sure this may need to be fxo_ks
callerid=asreceived
group=2
context=incoming
channel => 1

signalling=fxs_ls ; not sure this may need to be fxs_ks
group=1
context=default
channel => 3

I’m not sure if this matters, but you configured your devices in zapatel.conf to be kwelstart, then you use loopstart in zapata.conf. They may both need to be the same. I’m not 100% though, I have only done this a few times.

Good Luck,
Dan


#3

Thanks,
I adjusted that (I was trying different zaptel et zapata files from samples around the web).

Still the same error.

I try to trace in the zaptel and wtcdm modules what’s going on.


#4

I thought of this after my inital post. Are you /dev/zap/* devices created? Also make sure they have the correct permissions for the user you are running asterisk as.

Dan


#5

my dev zap are correct :
root@titus:~/zaptel-1.2.5 # ls -al /dev/zap/*
crw-rw---- 1 root root 196, 1 May 5 10:01 /dev/zap/1
crw-rw---- 1 root root 196, 2 May 5 10:01 /dev/zap/2
crw-rw---- 1 root root 196, 3 May 5 10:01 /dev/zap/3
crw-rw---- 1 root root 196, 4 May 5 10:01 /dev/zap/4
crw-rw---- 1 root root 196, 254 May 5 09:30 /dev/zap/channel
crw-rw---- 1 root root 196, 0 May 5 09:30 /dev/zap/ctl
crw-rw---- 1 root root 196, 255 May 5 09:30 /dev/zap/pseudo
crw-rw---- 1 root root 196, 253 May 5 09:30 /dev/zap/timer
root@titus:~/zaptel-1.2.5 #

I try to follow what happend in the zaptel/wctdm driver


#6

If you bought the card NEW (not gray market), I believe that you are entitle to some free support from Digium. You should give that a shot.

Dan


#7

Good idea,
the card is brand new from a digium reseller here.
Will try to write them a email from home tonight with serial number …


#8

thanks for your help, I found my problem after drilling module code with printk debug !

I have two card on my tdm400, slot 2 and 4. I was thinking that they start from 0 to 3.
ztcfg never report anything about setting non existing module :frowning:

I adjust my zaptel number and my zapata number too, now asterisk see both modules.

Next step trying to understand asterisk. It seems very impressing but far far from being ‘user friendly’ to configure.

Thanks.