Link to home
Create AccountLog in
Avatar of krusher00
krusher00

asked on

Configuring Digium TDM410P card for use in asterisk installation on Ubuntu server 7.10

I've recently setup a company VoIP server running asterisk 1.4 and freePBX to administrate it, which we would like to use to handle some incoming lines.

I've purchased and installed a Digium TDM410P with 2 x FXO and 2 x FXS modules + Echo Cancellation module, but the lights on the card don't light up to indicate it is active, and I can't get the card to work as trunks either, it seems as thou asterisk isn't recognising it at all.

I have confirmed the card is working but running up a trixbox installation on another box and putting the card in there where it works fine.

Running 'lspic' on the server shows the card as follows:
03:08.0 Ethernet controller: Digium, Inc. Unknown device 8005 (rev 11)

What is the standard way to get it to recognise and use this card?
I've been using asterisk for a couple of months now both for home and work use but have never installed a FXO/S card.

Edit: please also note for the hardware/line config, that the server is in Australia
Avatar of krusher00
krusher00

ASKER

What do you get if you run the following commands :-

ztcfg -vvv

lsmod

Can you post the contents of your /etc/sysconfig/zaptel file.
Running "sudo ztcfg -vvv"

Returns:

Zaptel Version: 1.4.8
Echo Canceller: MG2
Configuration
======================


Channel map:


0 channels configured.

ioctl(ZT_LOADZONE) failed: Invalid argument
Notice: Configuration file is /etc/zaptel.conf
line 11: Unable to register tone zone 'us'



---------


lsmod returns:

Module                  Size  Used by
af_packet              24840  2
ztdummy                 5584  0
lp                     12452  0
loop                   19076  0
snd_intel8x0           34972  0
snd_ac97_codec        100260  1 snd_intel8x0
ac97_bus                3200  1 snd_ac97_codec
snd_pcm_oss            44544  0
snd_mixer_oss          17664  1 snd_pcm_oss
snd_pcm                80388  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy           4740  0
snd_seq_oss            33152  0
snd_seq_midi            9600  0
snd_rawmidi            25728  1 snd_seq_midi
wctdm24xxp            123200  0
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
zaptel                193284  4 ztdummy,wctdm24xxp
snd_seq                53104  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
s3fb                   21760  0
svgalib                10624  1 s3fb
snd_timer              24324  2 snd_pcm,snd_seq
snd_seq_device          9228  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
crc_ccitt               3072  1 zaptel
8139cp                 25344  0
vgastate               11008  1 s3fb
snd                    54532  10 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               8800  1 snd
snd_page_alloc         11528  2 snd_intel8x0,snd_pcm
iTCO_wdt               11940  0
iTCO_vendor_support     4868  1 iTCO_wdt
psmouse                39952  0
serio_raw               8068  0
intel_rng               6656  0
shpchp                 34580  0
pci_hotplug            32576  1 shpchp
parport_pc             37668  1
parport                37448  2 lp,parport_pc
intel_agp              25620  1
agpgart                35144  1 intel_agp
pcspkr                  4224  0
ipv6                  278916  23
evdev                  11136  0
ext3                  133640  1
jbd                    60456  1 ext3
mbcache                 9732  1 ext3
sg                     36380  0
sr_mod                 17700  0
cdrom                  37408  1 sr_mod
sd_mod                 30336  3
floppy                 59876  0
ehci_hcd               36748  0
uhci_hcd               26640  0
8139too                27776  0
mii                     6656  2 8139cp,8139too
ata_piix               17540  2
ata_generic             8580  0
libata                125296  2 ata_piix,ata_generic
scsi_mod              146828  4 sg,sr_mod,sd_mod,libata
usbcore               138760  3 ehci_hcd,uhci_hcd
thermal                14344  0
processor              32072  1 thermal
fan                     5764  0
fuse                   47124  1
apparmor               40600  0
commoncap               8320  1 apparmor

---------

Zaptel file is located at "/etc/default/zaptel" on ubuntu, let me know if this makes any difference.

TELEPHONY=yes
# DEBUG: Pass debug=1 to modules you load.
#        May break xpp_usb.
#DEBUG=yes
#
#Alternatively set:  options zaptel debug=1
#in /etc/modprobe.d/zaptel or /etc/modprobe.conf.
#
# ZTCFG: The full path to ztcfg. default: /sbin/ztcfg .
#ZTCFG=/usr/local/sbin/ztcfg
#
# ZTCFG_CMD: allow adding extra parameters to the ztcfg command.
#            May be handy for -v, but mostly for:
#ZTCFG_CMD=/sbin/ztcfg -c /home/tzafrir/myzaptel.conf
#
# XPP_SYNC: Can be used to set an explicit Astribank unit as the
#           synchronizing Astribank. Passed to xpp_sync(8) .
#           Default is 'auto' and is almost always a good choice.
#XPP_SYNC=01

# Un-comment as per your requirements; modules to load/unload
#Module Name                      Hardware
#MODULES="$MODULES tor2"                # T400P - Quad Span T1 Card
                                # E400P - Quad Span E1 Card

MODULES="$MODULES wct4xxp"      # TE405P - Quad Span T1/E1 Card (5v version)
                                # TE410P - Quad Span T1/E1 Card (3.3v version)
#wct4xxp_ARGS="t1e1override=15" # Additional parameters for TE4xxP driver
# or use /etc/modprobe.d/zaptel or /etc/modprobe.conf .

#MODULES="$MODULES wcte12xp"    # TE120P - Single Span T1/E1 Card

#MODULES="$MODULES wct1xxp"     # T100P - Single Span T1 Card
                                # E100P - Single Span E1 Card

#MODULES="$MODULES wcte11xp"    # TE110P - Single Span T1/E1 Card

#MODULES="$MODULES wctdm24xxp"  # TDM2400P - Modular FXS/FXO interface (1-24 ports)

#MODULES="$MODULES wcfxo"       # X100P - Single port FXO interface
                                # X101P - Single port FXO interface

MODULES="$MODULES wctdm"        # TDM400P - Modular FXS/FXO interface (1-4 ports)

#MODULES="$MODULES wcusb"       # S100U - Single port FXS USB Interface

#MODULES="$MODULES torisa"      # Old Tormenta1 ISA Card

#MODULES="$MODULES ztdummy"     # Zaptel Timing Only Interface

#MODULES="$MODULES xpp_usb"     # Xorcom Astribank Device

# Disables Astribank hotplug firmware loading
#XPP_HOTPLUG_DISABLED=yes
#
# Disables Astribank udev hook called when an astribank is added and ready
# or removed.
#ASTRIBANK_HOOK_DISABLED=yes
#
# Setup the configuration for the PRI module of the Astribank.
# Default: all E1,TE . See xpp/README.Astribank .
#XPP_PRI_SETUP='NUM/*/XPD-01=NT,E1'

# Extensions genzaptelconf are (base + channel_number)
# base is by default 6000:
#base_exten=6000
#
# There are a host of other variables you can set to affect
# genzaptelconf. See the beginning of the script.
You seem to have the wctdm24xxp module loaded even though it is not enabled in the configuration.

I would try this.
Stop asterisk (/etc/init.d/asterisk stop)
Restart zaptel (/etc/init.d/zaptel restart)

The have a look at lsmod to see what modules are loaded now.

You can also have a look at the end of the /var/log/messages file to see if there are any warnings or errors mentioned there.
What kernel version are you running?
Zaptel 1.4.9 is available which has a fix for running under kernel 2.6.24
ok

grblades: firstly when I went to restart zaptel it gave me an error
Zaptel telephony kernel driver: ioctl(ZT_LOADZONE) failed: Invalid argument
Notice: Configuration file is /etc/zaptel.conf
line 11: Unable to register tone zone 'us'
zaptel.

I changed the loadzone in zaptel.conf to 'au' and restarted and it started fine.

------
Module                  Size  Used by
af_packet              24840  2
ztdummy                 5584  0
lp                     12452  0
loop                   19076  0
snd_intel8x0           34972  0
snd_ac97_codec        100260  1 snd_intel8x0
ac97_bus                3200  1 snd_ac97_codec
snd_pcm_oss            44544  0
snd_mixer_oss          17664  1 snd_pcm_oss
snd_pcm                80388  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy           4740  0
snd_seq_oss            33152  0
snd_seq_midi            9600  0
snd_rawmidi            25728  1 snd_seq_midi
wctdm24xxp            123200  0
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
zaptel                193284  2 ztdummy,wctdm24xxp
snd_seq                53104  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_m                                                                                                                               idi_event
s3fb                   21760  0
svgalib                10624  1 s3fb
snd_timer              24324  2 snd_pcm,snd_seq
snd_seq_device          9228  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmi                                                                                                                               di,snd_seq
crc_ccitt               3072  1 zaptel
8139cp                 25344  0
vgastate               11008  1 s3fb
snd                    54532  10 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mix                                                                                                                               er_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               8800  1 snd
snd_page_alloc         11528  2 snd_intel8x0,snd_pcm
iTCO_wdt               11940  0
iTCO_vendor_support     4868  1 iTCO_wdt
psmouse                39952  0
serio_raw               8068  0
intel_rng               6656  0
shpchp                 34580  0
pci_hotplug            32576  1 shpchp
parport_pc             37668  1
parport                37448  2 lp,parport_pc
intel_agp              25620  1
agpgart                35144  1 intel_agp
pcspkr                  4224  0
ipv6                  278916  23
evdev                  11136  0
ext3                  133640  1
jbd                    60456  1 ext3
mbcache                 9732  1 ext3
sg                     36380  0
sr_mod                 17700  0
cdrom                  37408  1 sr_mod
sd_mod                 30336  3
floppy                 59876  0
ehci_hcd               36748  0
uhci_hcd               26640  0
8139too                27776  0
mii                     6656  2 8139cp,8139too
ata_piix               17540  2
ata_generic             8580  0
libata                125296  2 ata_piix,ata_generic
scsi_mod              146828  4 sg,sr_mod,sd_mod,libata
usbcore               138760  3 ehci_hcd,uhci_hcd
thermal                14344  0
processor              32072  1 thermal
fan                     5764  0
fuse                   47124  1
apparmor               40600  0
commoncap               8320  1 apparmor

----

I am running 1.4.8, should I upgrade to 1.4.9?
If so, should I redownload and remove then re "make install" the new package?
or just use apt-get or similar?

Regards,
Krusher

Sorry, thats the zaptel version.
Kernal version is 2.6.22-14
Also, here's a list of the zaptel files found under /etc/
/etc/default/zaptel
/etc/init.d/zaptel
/etc/rc0.d/K30zaptel
/etc/rc1.d/K30zaptel
/etc/rc2.d/S15zaptel
/etc/rc3.d/S15zaptel
/etc/rc4.d/S15zaptel
/etc/rc5.d/S15zaptel
/etc/rc6.d/K30zaptel
/etc/udev/rules.d/zaptel.rules
/etc/zaptel.conf
/etc/zaptel.conf.bak

As you noted, the /etc/default/zaptel DOES have "wctdm24xxp" commented out, but still starts, even after a full system restart.
from /var/log/messages

--------
Mar 11 00:35:09 voip kernel: [   27.544556] Zapata Telephony Interface Registered on major 196
Mar 11 00:35:09 voip kernel: [   27.544562] Zaptel Version: 1.4.8
Mar 11 00:35:09 voip kernel: [   27.544564] Zaptel Echo Canceller: MG2
Mar 11 00:35:09 voip kernel: [   27.744789] ACPI: PCI Interrupt 0000:03:08.0[A] -> GSI 21 (level, low) -> IRQ 20
Mar 11 00:35:09 voip kernel: [   27.744947] PCI Config reg is 02900117
Mar 11 00:35:09 voip kernel: [   27.744955] Wildcard TDM410P: New Reg: fe590000!
Mar 11 00:35:09 voip kernel: [   27.745580] Detected REG0: 00000100
Mar 11 00:35:09 voip kernel: [   27.745778] Detected REG1: 00007849
Mar 11 00:35:09 voip kernel: [   27.746004] Detected REG2: 0000001d
Mar 11 00:35:09 voip kernel: [   27.746010] (pre) Reg fc is 50000027
Mar 11 00:35:09 voip kernel: [   27.746415] (post) Reg fc is 50000024
Mar 11 00:35:09 voip kernel: [   27.746639] Detected REG2: 0000ffff
Mar 11 00:35:09 voip kernel: [   27.746643] wctdm24xxp: reg is a04c0004
Mar 11 00:35:09 voip kernel: [   27.746698] Resetting the modules...
Mar 11 00:35:09 voip kernel: [   27.807645] During Resetting the modules...
Mar 11 00:35:09 voip kernel: [   27.816657] After resetting the modules...
Mar 11 00:35:09 voip kernel: [   28.000314] ACPI: PCI Interrupt 0000:00:1f.5[B] -> GSI 17 (level, low) -> IRQ 21
Mar 11 00:35:09 voip kernel: [   28.425501] intel8x0_measure_ac97_clock: measured 58316 usecs
Mar 11 00:35:09 voip kernel: [   28.425505] intel8x0: clocking to 48000
Mar 11 00:35:09 voip kernel: [   29.631433] Port 1: Installed -- AUTO FXS/DPO
Mar 11 00:35:09 voip kernel: [   31.662852] Port 2: Installed -- AUTO FXS/DPO
Mar 11 00:35:09 voip kernel: [   32.069140] Port 3: Installed -- AUTO FXO (FCC mode)
Mar 11 00:35:09 voip kernel: [   32.478418] Port 4: Installed -- AUTO FXO (FCC mode)
Mar 11 00:35:09 voip kernel: [   32.483407] VPM100: Not Present
Mar 11 00:35:09 voip kernel: [   32.896381] VPMADT032: firmware zaptel-fw-vpmadt032.bin not available from userspace
Mar 11 00:35:09 voip kernel: [   32.896525] wctdm24xxp: probe of 0000:03:08.0 failed with error -5
Mar 11 00:35:09 voip kernel: [   34.002208] loop: module loaded
Mar 11 00:35:09 voip kernel: [   34.032814] lp0: using parport0 (interrupt-driven).
Mar 11 00:35:09 voip kernel: [   34.194948] Adding 3028212k swap on /dev/sda5.  Priority:-1 extents:1 across:3028212k
Mar 11 00:35:09 voip kernel: [   34.530771] EXT3 FS on sda1, internal journal
Mar 11 00:35:09 voip kernel: [   36.778440] ztdummy: High Resolution Timer started, good to go
Mar 11 00:35:09 voip kernel: [   36.826669] Registered tone zone 1 (Australia)
Mar 11 00:35:13 voip kernel: [   39.883572] NET: Registered protocol family 17
Mar 11 00:35:13 voip kernel: [   40.445042] device eth0 entered promiscuous mode
Mar 11 00:35:13 voip kernel: [   40.445057] audit(1205159713.163:3): dev=eth0 prom=256 old_prom=0 auid=4294967295
----------
So it looks like it's sucessfully recognising the card here at least. Am not at work at the moment so not able to see if the light are on on the card yet.
These lines dont look right :-

Mar 11 00:35:09 voip kernel: [   32.896381] VPMADT032: firmware zaptel-fw-vpmadt032.bin not available from userspace
Mar 11 00:35:09 voip kernel: [   32.896525] wctdm24xxp: probe of 0000:03:08.0 failed with error -5

I would try a reboot and if that does not work then upgrade zaptel.
To upgrade you just download the new zaptel source and compile and install it. Not need to remove the previous version as it will be overwritten. Its best to reboot afterwards so that you know if it works it will continue to work if the box is rebooted.
Mar 11 08:38:17 voip kernel: [   30.199141] Port 1: Installed -- AUTO FXS/DPO
Mar 11 08:38:17 voip kernel: [   32.227565] Port 2: Installed -- AUTO FXS/DPO
Mar 11 08:38:17 voip kernel: [   32.638841] Port 3: Installed -- AUTO FXO (FCC mode)
Mar 11 08:38:17 voip kernel: [   33.048119] Port 4: Installed -- AUTO FXO (FCC mode)
Mar 11 08:38:17 voip kernel: [   33.053110] VPM100: Not Present
Mar 11 08:38:17 voip kernel: [   33.467911] VPMADT032: firmware zaptel-fw-vpmadt032.bin not available from userspace
Mar 11 08:38:17 voip kernel: [   33.468046] wctdm24xxp: probe of 0000:03:08.0 failed with error -5

Still shows the following, after the upgrade.
What does 'ztcfg -vvv' show now?
Zaptel Version: 1.4.9
Echo Canceller: MG2
Configuration
======================
Channel map:
0 channels to configure.
ZT_DEFAULTZONE failed: Invalid argument (22)
Can you post your /etc/zaptel.conf file
# Autogenerated by /usr/sbin/zapconf on Mon Mar 10 17:38:01 2008 -- do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#
# Span 1: ZTDUMMY/1 "ZTDUMMY/1 (source: HRtimer) 1" (MASTER)

# Global data

loadzone        = au
defaultzone     = us

-----
Update: changed defaultzone to 'au'

Now ztcfg -vvv reports:

Zaptel Version: 1.4.9
Echo Canceller: MG2
Configuration
======================
Channel map:
0 channels to configure.

--
Next step?
You dont have any channels defined in zapata.conf which is why it is not doing anything.
It sais that that file is automatically generated by /usr/sbin/zapconf so I would try running it and seeing what it does.
Running /usr/sbin/zapconf resets both loadzone and defaultzone back to 'us'
running ztcfg -vvv returns no errors and shows 0 channels.

How do I add the channels into zapata? (or what next?)
zapconf probably takes the configuration from the freepbx configuration somewhere and then writes the file.
You can modify the file directly but then you run a risk that after a reboot or some other event zapconf is run again and overites your custom settings and it all stops working.

From your earlier posting :-
Mar 11 08:38:17 voip kernel: [   30.199141] Port 1: Installed -- AUTO FXS/DPO
Mar 11 08:38:17 voip kernel: [   32.227565] Port 2: Installed -- AUTO FXS/DPO
Mar 11 08:38:17 voip kernel: [   32.638841] Port 3: Installed -- AUTO FXO (FCC mode)
Mar 11 08:38:17 voip kernel: [   33.048119] Port 4: Installed -- AUTO FXO (FCC mode)
It looks like you have a FXS module in port 1-2 and a FXO module in ports 3-4.
A FXO module uses fxs signalling and a FXS module uses fxo signalling (confusing I know).

So you could try manually adding the following to the /etc/zaptel.conf and trying the ztcfg command again :-
fxoks=1-2
fxsks=3-4
Zaptel Version: 1.4.9
Echo Canceller: MG2
Configuration
======================
Channel map:

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

4 channels to configure.

ZT_CHANCONFIG failed on channel 1: No such device or address (6)

Tried a restart to make sure settings were applied, no difference :-(
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks for all the help so far, hopefully I can use the information we've got here to sort it out with digium.