[RESOLVED]Issue with DAHDI module

Hello everybody

I have some issues with my analog FXO card. It seems to be correcty installed, but impossible to load the module in Asterisk.
I run Asterisk 1.8 with an anolog 4 slots card. On the 1st slot, I have a FXO, on the second : FXS, and the 2 others are empty.

Dahdi starts up without any problem :

flo@pbx:~$sudo /etc/init.d/dahdi restart
    Unloading DAHDI hardware modules: done
    Loading DAHDI hardware modules:
       wctdm: done
    Running dahdi_cfg: done.
    flo@pbx:~$lsdahdi
    ### Span  1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER)
      1 FXO        FXSKS       (EC: MG2 - INACTIVE)
      2 EMPTY
      3 unknown    Reserved
      4 unknown    Reserved

Scan should be OK :

    flo@pbx:~$sudo dahdi_scan
    [1]
    active=yes
    alarms=OK
    description=Wildcard TDM400P REV E/F Board 5
    name=WCTDM/4
    manufacturer=Digium
    devicetype=Wildcard TDM400P REV E/F
    location=PCI Bus 00 Slot 13
    basechan=1
    totchans=4
    irq=11
    type=analog
    port=1,FXO
    port=2,FXS FAILED
    port=3,none
    port=4,none

Here is the dahdi_cfg :

    flo@pbx:~$ sudo dahdi_cfg -vvv
    DAHDI Tools Version - 2.5.0.2

    DAHDI Version: 2.5.0.2
    Echo Canceller(s): HWEC, MG2
    Configuration
    ======================


    Channel map:

    Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)

    1 channels to configure.

    Setting echocan for channel 1 to mg2

Now the asterisk settings :
chan_dahdi.conf:


    ;[trunkgroups]

    [channels]
    language=fr
    busydetect=yes
    busycount=3
    #include dahdi-channels.conf

dahdi-channels.conf :

    ; Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 
    ;;; line="1 WCTDM/4/0 FXSKS"
    signalling=fxs_ks
    callerid=asreceived
    group=0
    context=from-pstn
    channel => 1
    callerid=
    group=
    context=default

From Asterisk, impossible to load the module chan_dahdi.so

    pbx*CLI> module load chan_dahdi.so
    Unable to load module chan_dahdi.so
    Command 'module load chan_dahdi.so' failed.
      == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
      == Parsing '/etc/asterisk/dahdi-channels.conf':   == Found
    pbx*CLI>

When I delete “channel => 1” in the dahdi-channel.conf, I am able to load the module, but no channel is available.

Does someone have any idea?

Is that output from “module load chan_dahdi.so” with full verbose and debug logging enabled? Also, I’m guessing you know your FXS module is having problems? Since you only have chan 1 configured in your /etc/asterisk config files, I doubt the failed FXS module is the reason for the failure to load though. Running “dmesg” should provide more information why it’s failing the load.

Thanks for your answer.
I forgot to mention that I just want to setup my FXO module for now. I don’t think I will use the FXS, as all clients are SIP phones.
Yes, when I launched the module load command, both verbose and debug were set to 5. I just had this error message, nether error nor warning message was showing up.

I launched dmesg command, and I have to say that was very helpfull :

[  661.660045] Unable to do INITIAL ProSLIC powerup on module 1
[  662.168012] Unable to do INITIAL ProSLIC powerup on module 1
[  662.168018] Module 1: FAILED FXS (FCC)
[  662.168101] Module 2: Not installed
[  662.168181] Module 3: Not installed
[  662.180822] Found a Wildcard TDM: Wildcard TDM400P REV E/F (1 modules)
[ 1917.844292] Freed a Wildcard
[ 1917.858976] dahdi: Telephony Interface Unloaded
[ 1917.885390] dahdi: Telephony Interface Registered on major 196
[ 1917.885397] dahdi: Version: 2.5.0.2
[ 1917.914732] Freshmaker version: 71
[ 1917.915076] Freshmaker passed register test
[ 1918.608259] Module 0: Installed -- AUTO FXO (FCC mode)
[ 1919.116027] ProSLIC on module 1 failed to powerup within 504 ms (0 mV only)
[ 1919.116030]
[ 1919.116031]  -- DID YOU REMEMBER TO PLUG IN THE HD POWER CABLE TO THE TDM400P??

So if I understand well, a wire should be unplugged in my server…
I am going to check it next monday, as my server is not at home.

Thanks for your help.

Hi

I still have an issue with this…
The power cable was unplugged… I re plugged it, but I am still not able to load the dahdi module.

Here is now the result of dmesg :

[    2.889253] [drm] nouveau 0000:01:00.0: Detected an NV10 generation card (0x011000b2)
[    2.889654] [drm] nouveau 0000:01:00.0: Attempting to load BIOS image from PRAMIN
[    2.930168] [drm] nouveau 0000:01:00.0: ... appears to be valid
[    2.930648] [drm] nouveau 0000:01:00.0: BMP BIOS found
[    2.930658] [drm] nouveau 0000:01:00.0: BMP version 5.16
[    2.930668] [drm] nouveau 0000:01:00.0: Bios version 03.11.00.02
[    2.930677] [drm] nouveau 0000:01:00.0: Found Display Configuration Block version 1.1
[    2.930687] [drm] nouveau 0000:01:00.0: No useful information in BIOS output table; adding all possible outputs
[    2.951240] [drm] nouveau 0000:01:00.0: Detected TV encoder: ch7006
[    2.951427] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 0 at offset 0x0780
[    2.951455] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 1 at offset 0x0E22
[    2.951471] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 2 at offset 0x079B
[    2.951497] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 3 at offset 0x0DC9
[    2.951514] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 4 at offset 0x0821
[    2.951528] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 5 at offset 0x0936
[    2.951556] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 6 at offset 0x084F
[    2.989540] [drm] nouveau 0000:01:00.0: Parsing VBIOS init table 7 at offset 0x08D1
[    3.492062] [drm] nouveau 0000:01:00.0: 0 available performance level(s)
[    3.492093] [drm] nouveau 0000:01:00.0: c: memory 143MHz core 199MHz
[    3.492251] [TTM] Zone  kernel: Available graphics memory: 445344 kiB.
[    3.492267] [TTM] Zone highmem: Available graphics memory: 512900 kiB.
[    3.492275] [TTM] Initializing pool allocator.
[    3.492308] [drm] nouveau 0000:01:00.0: Detected 32MiB VRAM
[    3.492637] agpgart-via 0000:00:00.0: AGP 2.0 bridge
[    3.492680] agpgart-via 0000:00:00.0: putting AGP V2 device into 2x mode
[    3.492765] nouveau 0000:01:00.0: putting AGP V2 device into 2x mode
[    3.492776] [drm] nouveau 0000:01:00.0: 64 MiB GART (aperture)
[    3.496905] [drm] nouveau 0000:01:00.0: Detected TV encoder: ch7006
[    3.501294] i2c-core: driver [ch7006] using legacy suspend method
[    3.501314] i2c-core: driver [ch7006] using legacy resume method
[    3.505971] ch7006 0-0075: Detected version ID: 40
[    3.609645] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    3.609667] [drm] No driver support for vblank timestamp query.
[    3.612754] [drm] nouveau 0000:01:00.0: Setting dpms mode 3 on vga encoder (output 0)
[    3.612778] [drm] nouveau 0000:01:00.0: Setting dpms mode 3 on TV encoder (output 1)
[    3.765208] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 160
[    3.765230] Raw EDID:
[    3.765239] <3>1f ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765244] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765248] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765253] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765257] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765261] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765266] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765270] <3>ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[    3.765274]
[    3.766841] i2c i2c-2: sendbytes: NAK bailout.
[    3.768816] i2c i2c-2: sendbytes: NAK bailout.
[    3.780295] [drm] nouveau 0000:01:00.0: DDC responded, but no EDID for VGA-1
[    3.803292] [drm] nouveau 0000:01:00.0: Load detected on head A
[    3.840354] [drm] nouveau 0000:01:00.0: allocated 1024x768 fb: 0x48000, bo f4cc5600
[    3.841470] fbcon: nouveaufb (fb0) is primary device
[    3.896097] [drm] nouveau 0000:01:00.0: Setting dpms mode 3 on TV encoder (output 1)
[    3.906333] [drm] nouveau 0000:01:00.0: Setting dpms mode 0 on vga encoder (output 0)
[    3.906341] [drm] nouveau 0000:01:00.0: Output VGA-1 is running on CRTC 0 using output A
[    3.916088] [drm] nouveau 0000:01:00.0: Setting dpms mode 3 on TV encoder (output 1)
[    3.916130] Console: switching to colour frame buffer device 128x48
[    3.917726] fb0: nouveaufb frame buffer device
[    3.917747] drm: registered panic notifier
[    3.917789] [drm] Initialized nouveau 0.0.16 20090420 for 0000:01:00.0 on minor 0
[    9.337700] EXT4-fs (dm-0): INFO: recovery required on readonly filesystem
[    9.337744] EXT4-fs (dm-0): write access will be enabled during recovery
[   11.456791] EXT4-fs (dm-0): recovery complete
[   11.457415] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[   18.753899] udevd[322]: starting version 173
[   18.858017] lp: driver loaded but no devices found
[   19.096130] EXT4-fs (dm-0): re-mounted. Opts: errors=remount-ro
[   19.332711] parport_pc 00:0a: reported by Plug and Play ACPI
[   19.332765] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[   19.435790] lp0: using parport0 (interrupt-driven).
[   19.624074] gameport gameport0: NS558 PnP Gameport is pnp00:0d/gameport0, io 0x201, speed 864kHz
[   19.733265] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[   19.921836] Modular ISDN core version 1.1.21
[   19.992672] NET: Registered protocol family 34
[   20.036338] mISDNipac module version 2.0
[   20.097343] Netjet PCI driver Rev. 2.0
[   20.097553] Netjet: Digium TDM400P not handled yet
[   20.233749] type=1400 audit(1321612944.183:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=431 comm="apparmor_parser"
[   20.237275] type=1400 audit(1321612944.187:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=431 comm="apparmor_parser"
[   20.237863] type=1400 audit(1321612944.187:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=431 comm="apparmor_parser"
[   20.277953] type=1400 audit(1321612944.227:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=437 comm="apparmor_parser"
[   20.285293] type=1400 audit(1321612944.235:6): apparmor="STATUS" operation="profile_load" name="/usr/sbin/ntpd" pid=438 comm="apparmor_parser"
[   20.287462] type=1400 audit(1321612944.235:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=437 comm="apparmor_parser"
[   20.300198] type=1400 audit(1321612944.251:8): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=437 comm="apparmor_parser"
[   20.334127] type=1400 audit(1321612944.283:9): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/ntpd" pid=442 comm="apparmor_parser"
[   20.363193] ISDN subsystem Rev: 1.1.2.3/1.1.2.3/1.1.2.2/1.1.2.3/1.1.2.2/1.1.2.2 loaded
[   20.372829] irda_init()
[   20.372871] NET: Registered protocol family 23
[   20.769237] HiSax: Linux Driver for passive ISDN cards
[   20.769247] HiSax: Version 3.5 (module)
[   20.769252] HiSax: Layer1 Revision 2.46.2.5
[   20.769257] HiSax: Layer2 Revision 2.30.2.4
[   20.769260] HiSax: TeiMgr Revision 2.20.2.3
[   20.769265] HiSax: Layer3 Revision 2.22.2.3
[   20.769268] HiSax: LinkLayer Revision 2.59.2.4
[   20.872439] dahdi: Telephony Interface Registered on major 196
[   20.872447] dahdi: Version: 2.5.0.2
[   20.927112] VIA 82xx Audio 0000:00:11.5: PCI INT C -> Link[LNKC] -> GSI 12 (level, low) -> IRQ 12
[   20.927271] VIA 82xx Audio 0000:00:11.5: setting latency timer to 64
[   21.736880] wctdm 0000:00:09.0: PCI INT A -> Link[LNKA] -> GSI 11 (level, low) -> IRQ 11
[   21.737900] Freshmaker version: 71
[   21.738244] Freshmaker passed register test
[   22.432262] Module 0: Installed -- AUTO FXO (FCC mode)
[   23.607826] Module 1: Installed -- AUTO FXS/DPO
[   23.607910] Module 2: Not installed
[   23.607991] Module 3: Not installed
[   23.609787] tulip 0000:00:0d.0: eth1: tulip_stop_rxtx() failed (CSR5 0xfc664010 CSR6 0xff972113)
[   23.609802] net eth1: Setting full-duplex based on MII#1 link partner capability of 45e1
[   23.669962] Found a Wildcard TDM: Wildcard TDM400P REV E/F (2 modules)
[   24.445594] ppdev: user-space parallel port driver
[   26.546823] type=1400 audit(1321612950.495:10): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=747 comm="apparmor_parser"
[   26.547928] type=1400 audit(1321612950.495:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=747 comm="apparmor_parser"
[   26.548779] type=1400 audit(1321612950.499:12): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=747 comm="apparmor_parser"
[   26.564855] type=1400 audit(1321612950.515:13): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/ntpd" pid=748 comm="apparmor_parser"
[   26.584786] type=1400 audit(1321612950.535:14): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=749 comm="apparmor_parser"
[   27.230853] init: failsafe main process (694) killed by TERM signal
[   27.262276] init: apport pre-start process (786) terminated with status 1
[   27.374871] init: apport post-stop process (823) terminated with status 1
[   28.006037] Adding 1044476k swap on /dev/mapper/cryptswap1.  Priority:-1 extents:1 across:1044476k
[   28.075738] dahdi_echocan_mg2: Registered echo canceler 'MG2'
[   31.264024] eth1: no IPv6 routers present
[  601.056063] [drm] nouveau 0000:01:00.0: Setting dpms mode 1 on vga encoder (output 0)
[95256.767664] Freed a Wildcard
[95256.804707] dahdi: Telephony Interface Unloaded
[95256.829229] dahdi: Telephony Interface Registered on major 196
[95256.829236] dahdi: Version: 2.5.0.2
[95256.850654] Freshmaker version: 71
[95256.850998] Freshmaker passed register test
[95257.544260] Module 0: Installed -- AUTO FXO (FCC mode)
[95258.719584] Module 1: Installed -- AUTO FXS/DPO
[95258.719668] Module 2: Not installed
[95258.719749] Module 3: Not installed
[95258.731362] Found a Wildcard TDM: Wildcard TDM400P REV E/F (2 modules)
[95259.020451] dahdi_echocan_mg2: Registered echo canceler 'MG2'

i didn’t find any error on this log…

Here is now the result of dahdi_cfg :

DAHDI Tools Version - 2.5.0.2

DAHDI Version: 2.5.0.2
Echo Canceller(s): HWEC, MG2
Configuration
======================


Channel map:

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

2 channels to configure.

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

And the result of dahdi_scan :

[1]
active=yes
alarms=OK
description=Wildcard TDM400P REV E/F Board 5
name=WCTDM/4
manufacturer=Digium
devicetype=Wildcard TDM400P REV E/F
location=PCI Bus 00 Slot 10
basechan=1
totchans=4
irq=11
type=analog
port=1,FXO
port=2,FXS
port=3,none
port=4,none

After launching dahdi_genconf, the dahdi-channel has been modified :

; Autogenerated by /usr/sbin/dahdi_genconf on Sat Nov 19 13:57:45 2011
; If you edit this file and execute /usr/sbin/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 E/F Board 5" (MASTER) 
;;; line="1 WCTDM/4/0 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
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

And the system.conf is now:

# Autogenerated by /usr/sbin/dahdi_genconf on Sat Nov 19 13:57:45 2011
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 
fxsks=1
echocanceller=mg2,1
fxoks=2
echocanceller=mg2,2
# channel 3, WCTDM/4/2, no module.
# channel 4, WCTDM/4/3, no module.

# Global data

loadzone	= fr
defaultzone	= fr

When I want to load the module in asterisk :

Asterisk 1.8.7.1, Copyright (C) 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for detail                                                            s.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.7.1 currently running on pbx (pid = 3527)
pbx*CLI> core set verbose 5
Verbosity was 0 and is now 5
pbx*CLI> core set debug 5
Core debug was 0 and is now 5
pbx*CLI> module load chan_dahdi.so
Unable to load module chan_dahdi.so
Command 'module load chan_dahdi.so' failed.
  == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
  == Parsing '/etc/asterisk/dahdi-channels.conf':   == Found
pbx*CLI> da
data      database
pbx*CLI> data

Any ideas?

Many thanks

Hi

I finaly resolved this issue by editing the file :
/etc/modprobe.d/dahdi.blacklist.conf :

blacklist wct4xxp
blacklist wcte12xp
blacklist wct1xxp
blacklist wcte11xp
blacklist wctdm24xxp
blacklist wcfxo
blacklist wctdm
blacklist wctc4xxp
blacklist wcb4xxp
blacklist netjet
blacklist avmfritz
blacklist hfc4s8s_l1
blacklist netjetpci
blacklist hisax
blacklist hisax_fcpcipnp
blacklist hisax_isac
blacklist crc_ccitt
blacklist isdn
blacklist slhc
blacklist capi
blacklist capifs
blacklist kernelcapi
blacklist kernel_capi

And now it works fine!

Thanks for your help.