Error on reload after DAHDI Trunk configuration - New Installation

I have e new installation of FreePBX 13. Ran all updates, and am on 13.66-6 (x64) with all modules updated. The first thing I did was configure my analog trunks. Ran DAHDI Configuration, then configured my first analog trunk. FreePBX throws off an error, and will not reload.

“Reload faild because retrieve_conf encountered and error:1”

Further information:

exit: 1
Whoops\Exception\ErrorException: file_put_contents(/etc/wanpipe/global.conf): failed to open stream: Permission denied in file /var/www/html/admin/modules/dahdiconfig/modules/sangoma.module on line 116
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/admin/modules/dahdiconfig/modules/sangoma.module:116
  2. Whoops\Run->handleError() :0
  3. file_put_contents() /var/www/html/admin/modules/dahdiconfig/modules/sangoma.module:116
  4. dahdi_sangoma->generateConf() /var/www/html/admin/modules/dahdiconfig/includes/dahdi_cards.class.php:1405
  5. dahdi_cards->write_modules() /var/www/html/admin/modules/dahdiconfig/functions.inc.php:27
  6. dahdiconfig_conf->dahdiconfig_conf() /var/lib/asterisk/bin/retrieve_conf:516

I changed permissions on sangoma.module, but that did not help. Any other suggestions?

setup-sangoma from the CLI and configure the card correctly - answer a few questions - let it restart Asterisk (since it’s not running anyway) and post results.

I ran setup-sangoma from the CLI. It found no cards. My card is an OpenVOX 4-port analog card with Digium compatibility.

This is confusing to me, because I did this several times previously with this hardware with no errors. Now all of a sudden I am getting an error with a fresh install.

Ok, that is a clone of a Digium card, so from the cli “dahdi_genconf” and then restart Dahdi and Asterisk (“amportal kill” and “amportal start”) and go into the asterisk command line “asterisk -vvvr” and then check dahdi with “dahdi show status” and “dahdi show channels” and post your results.

Thanks, G.

I have no such program to run. I did a search of the entire hard drive and came up with no program for “dadhi-genconf”.

dahdi_genconf - sorry. Dang typos!

http://linux.die.net/man/8/dahdi_genconf

localhost*CLI> dahdi show status

Description Alarms IRQ bpviol CRC Fra Codi Options LBO

Wildcard TDM400P REV E/F Board 5 OK 0 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)

localhost*CLI> dahdi show channels

Chan Extension Context Language MOH Interpret Blocked In Service Description

pseudo default default Yes

It wasn’t the permissions on sangoma.module which were wrong but the permissions on /etc/wanpipe/global.conf…

(sangoma.module at line 116 tries to write that file)

I wonder why it was not able to write a default configuration there… Even if you don’t have a Sangoma card this directory should have been there I believe… Did you play with persmissions on anything under /etc?

Good luck and have a nice day!

Nick

Nick -

Thanks. I had no global.conf file in the directory. I created a null file, changed ownership to asterisk, and changed Rights, and I was able to get it to work.

There must be a problem with the distro, because I used a fresh install, and I tested it a couple of times with the same result.

Dave

1 Like

fwconsole chown

would have fixed this issue

Hi Andrew!

Why this would be necessary on a new install is the question though…

Have a nice day!

Nick

Probably because on first boot setup-sangoma was run. Which if it’s done as root owns the files as root as well.

I would have to ask why? , if you don’t have any Sangoma hardware, the “distribution” should not push that on you, no? If Dahdi supports OpenVox in the “distribution” it should “know”

Caveate, I don’t use the the “distibution” but have used sangoma hardware for years, equally as good as the Digium stuff . . . maybe better , but without doubt a different philosophy (read driver) . . … (not so much the cloned hardware :slight_smile: )

It’s not in our scripts. It’s just a guess. I don’t want to assume what the user did or did not do.

It does not support OpenVox.

Makes sense…

So does this though…

Andrew, if dicko concern cannot be easily address do you think it would be possible to automagically do a “fwconsole chown” after first boot to restore the proper permissions?

Thank you and have a nice day!

Nick

Good point . . . lets see what the OP did to get in this mess . . .

also a good point, that script should detect the absence of Sangoma hardware before interfering.

hmm @marbled post that was my answer to disappeared , what’s going on?

As I said before, it was a clean install. I installed FPBX and went to configure my trunks. An error came up right away.

“fwconsole chown” fixed the problem. I have learned something. Thanks for helping a newbie out.

Dave