DAHDI Errors - Permission denied

I have reinstalled the distro several times now, and DAHDI seems to die after updates and reboots. I have not narrowed down the exact cause yet.

My /etc/dahdi/system.conf file and my /etc/asterisk/chan_dahdi_groups.conf file seem to be overwritten, and DAHDI fails. If I do a “module unload chan_dahdi.so” followed by a “module load chan_dahdi.so” (after restoring the overwritten conf files), I get the following:
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:4324 dahdi_open: Unable to open ‘/dev/dahdi/channel’: Permission denied
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:12357 mkintf: Unable to open channel 1: Permission denied
here = 0, tmp->channel = 1, channel = 1
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:17952 build_channels: Unable to register channel ‘1’
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:18159 process_dahdi: Channel ‘1’ failure ignored: ignore_failed_channels.
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:4324 dahdi_open: Unable to open ‘/dev/dahdi/channel’: Permission denied
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:12357 mkintf: Unable to open channel 2: Permission denied
here = 0, tmp->channel = 2, channel = 2
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:17952 build_channels: Unable to register channel ‘2’
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:18159 process_dahdi: Channel ‘2’ failure ignored: ignore_failed_channels.
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:4324 dahdi_open: Unable to open ‘/dev/dahdi/channel’: Permission denied
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:12357 mkintf: Unable to open channel 3: Permission denied
here = 0, tmp->channel = 3, channel = 3
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:17952 build_channels: Unable to register channel ‘3’
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:18159 process_dahdi: Channel ‘3’ failure ignored: ignore_failed_channels.
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:4324 dahdi_open: Unable to open ‘/dev/dahdi/channel’: Permission denied
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:12357 mkintf: Unable to open channel 4: Permission denied
here = 0, tmp->channel = 4, channel = 4
[2015-11-24 20:25:49] ERROR[6114]: chan_dahdi.c:17952 build_channels: Unable to register channel ‘4’
[2015-11-24 20:25:49] WARNING[6114]: chan_dahdi.c:18159 process_dahdi: Channel ‘4’ failure ignored: ignore_failed_channels.

I am running FreePBX 10.13.66-6 (x64). Any ideas?

If you are editing
/etc/dahdi/system.conf file
and
/etc/asterisk/chan_dahdi_groups.conf

Well anything dahdi related :wink: (and there are very good reasons to do that, for many reasons) then you will need to disable/uninstall/delete the “dahdi helper module” in FreePBX as it will overwrite them on a reboot.

Hi!

Maybe it’s just bad luck on my part tonight but I seem to have the same problem…

The only thing that seems to work right now is doing a “fwconsole restart” after a reboot…

Which hardware do you have? I have a Sangoma A200…

Have a nice day!

Nick

Try it, disable the “dahdi helper module”, /etc/dahdi and the /etc/asterisk/dahdi files will be preserved over a reboot.

As far as I know you are right about this but ever since one of the recent updates my DAHDI stuff doesn’t survive a reboot and it used to and it’s normal behavior for these files to be rewritten like that…

They recently updated in the distro wanpipe to 7.0.14 (latest version from Sangoma is 7.0.15 and the version we had before was 7.0.12) and a lot of the DAHDI tools and I guess one of these updates is causing NDSiouxFan and me problems…

I also got the latest batch of updates to FreePBX modules today (and there were quite a few) but I doubt it is that…

Have a nice day!

Nick

Did you try my suggestion yet? Once it has “helped” you, you can disable it or it will “help you again” every reboot :wink: . Any changes you want must be done in the GUI if it is enabled, when disabled then those files will be stable over a reboot.

Thanks guys. I restored my .conf files and reloaded, and got my analog lines to work. Nick, I am running with a OpenVox card with 4 FXO ports connected to my PSTN.

Dicko, I do not see a “dahdi helper module” in my Module Admin. If I disable my “dahdi config” in module administration, I do not lose my analog channels upon disable, and it survives a reboot, but then I do not have access to look at my DAHDI channels under Connectivity.

At least it works now. Thanks.

I will do more tests tonight (if I have a chance, yesterday problem created a “panic”)…

Thank you and have a nice day!

Nick

Hi David!

Did you recently update your packages? I had a few news dahdi* packages installed a few days ago and this was my first reboot since then…

In my case simply doing a “fwconsole restart” once the machine was booted did the trick… The files we talked about had the right permissions but I have not checked their content yet…

Have a nice day!

Nick

Nick - This is a development stage PBX not in service yet, so I have been installing the distro and running all of the updates. After I rebooted, it appeared that my .conf files were overwritten. A “fwconsole restart” did not bring it back until I restored my dahdi .conf files. I then ran a “fwconsole restart” and my analog channels came back. FreePBX indicated that I had new hardware, and the channels would not work until I went in and did an Edit under DAHDI Config. I was able to make (and receive) PSTN calls after I did an Edit.

OK, thank you!

There’s special handling for Sangoma (and Digium) cards when you restart fwconsole so that might explain the different behavior…

I am currently trying to revert my last package update, we will see how that goes…

There was a lot of DAHDI related packages updated in it, that’s why I am suspecting it…

Thank you and have a nice day!

Nick

That made the situation worse…

There was probably something else that needed to be reset but I did not know what it was…

I had to reapply those updates, reboot and then issue a “fwconsole restart”…

Have a nice day!

Nick

I went one step further…

I copied the entire working configuration and the entire non working configuration…

No difference…

The problem does not behave in exactly the same way for me and David but then there is special support for Sangoma hardware in the FreePBX/FreePBX distro scripts and my card is a Sangoma A200.

Thank you and have a nice day!

Nick

Hi!

I have created a ticket, http://issues.freepbx.org/browse/FREEPBX-10859 .

Have a nice day!

Nick

The good old non “dahdi helper” sangoma install works fine, coincidentally I did it today for a real world client . . . 2x4 port hardware with EC, everything worked perfectly.

http://wiki.sangoma.com/wanpipe-linux-drivers

specifically

ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-7.0.15.tgz

a quick look suggests that it might then work in the GUI also, but that is not my preference, so . . . . I edit . . . . dahdi . . . wherever to suit.

Now that FreePBX is under the patronage of Sangoma, I am sure they will fix any problems reported very soon.

Personally I call that DAHDI helper non-native support… Now that FreePBX is under Sangoma I hope they will eventually add real native support…

There are quite a few settings like Hardware EC DTMF support we can’t set when using it…

dicko, they not only updated the wanpipe drivers but a lot of dahdi* packages, I am assuming these might be the cause of the problem…

I could turn off Sangoma DAHDI support but I don’t expect it would make any difference because the files that are generated for a working config and a non-working config are identical

(under /etc/dahdi, /etc/asterisk and /etc/wanpipe…)

It look like something gets incorrectly initialized at boot (or maybe it’s some sort of permission problem, I also got those “Permission denied” messages IIRC…).

Thank you and have a nice day!

Nick

Because Sangoma and FreePBX are all in the same stable, then hopefully they will get it working eventually, I can assure you I have successfully used both Sangoma hardware and FreePBX for many years, I am very happy with both of them , but because of old habits and distrust of the dahdi helper module’s completeness, I just do it outside of the FreePBX dahdi module, end of problem, works like a champ.

Call me a non-conformist but my shit works.

Hi!

It is very incomplete, there are quite a few parameter like hardware DTMF and detection which can’t be set for example with it and it looks like with more recent drivers there are other new options which cannot be configured from here…

And it did for me too, removing dahdi-config and setuping manually is the only thing that works…

I would have like to go the FreePBX way but I can’t afford to have a server which won’t survive a reboot and my ticket was just today assigned to someone…

Thank you and have a nice day!

Nick

Well it was American thanksgiving so perhaps they should have assigned it to a Canadian/Sangoma dude, I believe they did that holiday a couple of weeks ago :wink: (I kinda like setuping Eh! :slight_smile: )

Good point but I doubt Leo and the other guys there are that familiar with FreePBX (but I could be wrong…).

(The reason I had to reboot that server in the first place is that I had to send them a FXS module under RMA so I dealt a lot with Leo…)

And yes, Thanksgiving is the second Monday of October here (I am Canadian)…

Thank you and have a nice day!

Nick