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