New Install - DAHDI Help

Just did a fresh install with the latest build as of 2 days ago.

The TDM400 card was in the system when the install was performed.

When I first went into the GUI, DAHDI was not showing up on the menu column, so went into the modules admin section, selected all the repositories and checked dahdi, and not it shows up there with 2.9.0.1.

I can now go in and see the dahdi card listed there with 3 FXO and 1 FXS, edit the port details.

Dahdi_scan shows

[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 07 Slot 10
basechan=1
totchans=4
irq=209
type=analog
port=1,FXO
port=2,FXO
port=3,FXO
port=4,FXS

If I go to Asterisk CLI - there is no reference to dahdi when I do “core show help”

All of the documentation I have found only lists older installs, and most of it references ZAPTEL

Did I miss something?

With the new dahdi, do we even have to worry about zaptel any more? Other than for the DID’s?

If DAHDI shows up in the left column SETUP menu, should it not be available in the Asterisk CLI list of commands?

Core Show Help does not list any dahdi commands

**

Asterisk Ver. 1.8.6.0 & Freepbx 2.9.0.7

No, you missed a step in programming DAHDI.

The DAHDI modules have nothing to do with actually loading the driver.

If you stop Asterisk and restart DAHDI what does it say is available for channels?

Observed this with the latest FreePBX Distro (1.86.29.55-1): no dahdi in the cli even though lsdahdi was good to go. Examination of logs indicated chan_dahdi.so was failing to load because of missing dependencies (i.e. ss7). I reinstalled the latest Asterisk from source and problem solved.

Of course, this was all after I had installed the latest dahdi-complete from source because the centos5 rpms furnished by the FreePBX distro lack Xorcom firmware!

No DAHDI in the CLI if chan_dahdi module is installed indicated a configuration error.

Restarting DAHDI shows…

Loading DAHDI hardware modules:
wctdm24xxp: [ OK ]
wctdm: [ OK ]

Running dahdi_cfg: [ OK ]

Cannot do a DAHDI show channels as its not listed on the CLI

I restarted asterisk with extra verbose and tried to make a call on that trunk…

WARNING[3267]: channel.c:5503 ast_request: No channel type registered for ‘DAHDI’
[2011-09-19 12:03:38]
WARNING[3267]: app_dial.c:2197 dial_exec_full: Unable to create channel of type ‘DAHDI’ (cause 66 - Channel not implemented)

I performed a fresh install from 1.86.29.55 distro and the card was installed in the box on installation.

Wasn’t sure if I did something wrong, or missed doing something - there not a lot of new info on Dahdi - most of it is older and refers to older releases and references ZAPtel

What errors do you get when you restart DAHDI?

Perform the following:

stop asterisk 'service asterisk stop’
stop dahdi ‘service dahdi stop’

run config 'dahdi_cfg -vvvvvv’
note any errors
start dahdi 'service dahdi start’
note any errors
check status 'service dahdi status’
If you don’t see your channels stop here

start asterisk 'service asterisk start’
note any log errors, this will point to a config problem

Stopping safe_asterisk: [FAILED]
Shutting down asterisk: [ OK ]
[1]+ Killed /usr/sbin/asterisk -vvvv

]# service dahdi stop
Unloading DAHDI hardware modules: done

dahdi_cfg -vvvvvv

DAHDI Tools Version - 2.5.0
Notice: Configuration file is /etc/dahdi/system.conf
line 0: Unable to open master device ‘/dev/dahdi/ctl’

1 error(s) detected

]# service dahdi status

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

1 FXO FXSKS (EC: MG2 - INACTIVE)
2 FXO FXSKS (EC: MG2 - INACTIVE) RED
3 FXO FXSKS (EC: MG2 - INACTIVE) RED
4 FXS FXOKS (EC: MG2 - INACTIVE)

Just looked at the log, and it appears that I have the same issue with the chan_dahdi.so

Just looked at the log, and it appears that I have the same issue with the chan_dahdi.so

what is the output of the following command?

ldd /usr/lib/asterisk/modules/chan_dahdi.so

]# ldd /usr/lib/asterisk/modules/chan_dahdi.so
linux-gate.so.1 => (0x009e6000)
libtonezone.so.2.0 => /usr/lib/libtonezone.so.2.0 (0x0061c000)
libpri.so.1.4 => /usr/lib/libpri.so.1.4 (0x00352000)
libss7.so.1 => not found
libopenr2.so.1 => not found
libpthread.so.0 => /lib/libpthread.so.0 (0x00b89000)
libc.so.6 => /lib/libc.so.6 (0x003bc000)
libm.so.6 => /lib/libm.so.6 (0x009a7000)
/lib/ld-linux.so.2 (0x0025b000)

So you reinstalled Asterisk?

Yes, and that output matches what I was seeing before the reinstall. However, I’m not sure that is the best resolution going forward – if unable to apply distro updates I might as well just use Gentoo and start from scratch :slight_smile: Evaluating Piaf Purple as an alternative platform atm…

So exactly how did you install the system? Was it from a Distro or scratch?

I installed it from FreePBX Distro 1.86.29.55-1

I did a fresh install from the 1.86.29.55-1 distro - TDM card was loaded in box for install process and no errors when booting up and loading drivers for the TDM cards

Went into Module Admin and added DAHDI Admin and got the following error

exit: 1
found language dir fr for directory, not installed on system, skipping
Failed to backup old config: Permission denied
[FATAL] INSERT INTO dahdi_spans (span, framing, definedchans, coding, signalling, switchtype, syncsrc, lbo, pridialplan, prilocaldialplan, group, context) VALUES [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]

Trace Back:

/var/www/html/admin/modules/dahdiconfig/functions.inc.php:1107 die_freepbx()
[0]: INSERT INTO dahdi_spans (span, framing, definedchans, coding, signalling, switchtype, syncsrc, lbo, pridialplan, prilocaldialplan, group, context) VALUES [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 1]

/var/www/html/admin/modules/dahdiconfig/functions.inc.php:461 dahdi_cards->write_spans()

/var/www/html/admin/modules/dahdiconfig/functions.inc.php:184 dahdi_cards->load()

/var/www/html/admin/modules/dahdiconfig/functions.inc.php:34 dahdi_cards->dahdi_cards()

/var/lib/asterisk/bin/retrieve_conf:399 dahdiconfig_conf->dahdiconfig_conf()
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

Then went to dashboard as directed above and

retrieve_conf failed to sym link:
/etc/asterisk/chan_dahdi.conf from dahdiconfig/etc
This can result in FATAL failures to your PBX. If the target file exists and not identical, the symlink will not occur and you should rename the target file to allow the automatic sym link to occur and remove this error, unless this is an intentional customization.
Added 14 minutes ago
(retrieve_conf.SYMLINK)

I got the same problem with a FRESH installation of FreePBX distro 1.86.29.55-1. The problem seems to be that asterisk does not load chan_dahdi.so. Using “module load chan_dahdi.so” I get the following error message :

Unable to load module chan_dahdi.so
Command 'module load chan_dahdi.so ’ failed.
[2011-09-23 14:06:32] WARNING[4213]: loader.c:387 load_dynamic_module: Error loading module ‘chan_dahdi.so’: libss7.so.1: cannot open shared object file: No such file or directory
[2011-09-23 14:06:32] WARNING[4213]: loader.c:839 load_resource: Module ‘chan_dahdi.so’ could not be loaded.

And also “ldd /usr/lib/asterisk/modules/chan_dahdi.so” :

    linux-gate.so.1 =>  (0x0031d000)
    libtonezone.so.2.0 => /usr/lib/libtonezone.so.2.0 (0x0069d000)
    libpri.so.1.4 => /usr/lib/libpri.so.1.4 (0x00110000)
    libss7.so.1 => not found
    libopenr2.so.1 => not found
    libpthread.so.0 => /lib/libpthread.so.0 (0x0039e000)
    libc.so.6 => /lib/libc.so.6 (0x0017a000)
    libm.so.6 => /lib/libm.so.6 (0x007bb000)
    /lib/ld-linux.so.2 (0x00624000)

My guess is that a libSS7 is missing due to some depedency??

Thanks

PS. Shouldn’t this be moved to the FreePBX distro section ? :slight_smile:

I found a solution that worked for me.

Run “yum install libss7* libopen*” and reboot. After restart try:

asterisk -rvvvvvv
dahdi show channels

It should work.

That worked - thanks very much easrant

Hopefully that can be added to the next round of distro

Admin - Module Admin - DAHDi 2.8.0 was not installed by default.
Solution install DAHDi Config 2.8.0