[Home]

Summary:ASTERISK-23771: chan_dahdi.so loads even if dahdi doesn't
Reporter:James Finstrom (TheJames)Labels:
Date Opened:2014-05-21 12:32:15Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Channels/chan_dahdi
Versions:11.9.0 13.18.4 Frequency of
Occurrence
Related
Issues:
Environment:FreePBX Distro (latest)Attachments:
Description:chan_dahdi.so loads without checking if dahdi is loaded.

With dahdi unloaded
{code}
localhost*CLI> dahdi show channels
  Chan Extension       Context         Language   MOH Interpret        Blocked    State      Description                    
pseudo                 default                    default                         In Service  
{code}
{code}
localhost*CLI> dahdi show status
No DAHDI found. Unable to open /dev/dahdi/ctl: No such file or directory
Command 'dahdi show status' failed.
{code}

If there is no /dev/dahdi/ctl the module should bomb out just as if there were a bad config.
Comments:By: Shaun Ruffell (sruffell) 2014-05-21 12:39:43.932-0500

I'm not sure about this. It's possible for chan_dahdi to be configured based on hotplug events after Asterisk has already started depending on the setting of the "ignore_failed_channels" configuration item.

By: Tzafrir Cohen (tzafrir) 2014-05-22 03:56:12.442-0500

Is the output from 'status' confirmed in the shell? What is the output of:

lsmod | grep dahdi

lsdahdi

dahdi_test

By: James Finstrom (TheJames) 2014-05-22 08:47:05.309-0500

{code}
[root@localhost ~]# lsmod | grep dahdi
[root@localhost ~]# lsdahdi
[root@localhost ~]# dahdi_test
Unable to open dahdi interface: No such file or directory
[root@localhost ~]#
{code}

Note in this use case dahdi is being used as a dependency for meetme and not for actual hardware.

By: Tzafrir Cohen (tzafrir) 2014-05-22 09:46:00.499-0500

FreePBX Distro includes backports of some relevant patches from Asterisk 12 here. So what I write here is regarding Asterisk >= 12.

chan_dahdi may load later than the dahdi kernel code. In that case, we want to make the dahdi command 'dahdi create channels' available and we want to make chan_dahdi usable afterwards.

That said, the output of 'dahdi show channels' is indeed surprising.

By: Shaun Ruffell (sruffell) 2014-06-06 09:32:04.778-0500

Ahh...I didn't notice the output from show channels when this issue was originally opened.  Yes...that doesn't seem right.