SOLVED: Config not applied to Asterisk

Hi all,

don’t know what happened but currently the config we apply in Freepbx isn’t picked up in the Asterisk processes.
After (even) restarting the whole box, Freepbx still has those changes so the config database is working, however all those new settings are not applied on Asterisk.

How can I troubleshoot this?


Version info and specific examples please :smile:

I’m sorry :smirk:

Freepbx 12.0.65 and Asterisk 11.16.0…
Examples are easy, whenever we change anything in Freepbx (I.E. change a character, add extension etc) and hit Appy changes they are saved and Asterisk is reloading, however these changes will not become active in Asterisk.
Freepbx remembers the changes because next time I access the interface it’s all there (even after a reboot).

Amportal a r / chown etc all was tried, but didn’t help.

with kind regards,

Leon Blokland,

I’m having the same issue! FreePBX 12.0.65/Asterisk 11.17 on a Raspberry Pi. Thank goodness some config somewhere has stuck so my phone server still works, but no changes made in FreePBX are applied to Asterisk. They do stick in FreePBX, however.

Ran amportal a dbug, this is what came back

trying to run as user asterisk:

[FPBXDBUGDISABLE] changed from previous value: [1] to new value: [0]

==> /var/log/asterisk/freepbx_dbug <==

2015-Jun-02 16:45:02 /var/www/html/admin/libraries/BMO/Freepbx_conf.class.php:974
[NOTICE]: Undefined index: modified

2015-Jun-02 16:48:06 /var/www/html/admin/libraries/BMO/Freepbx_conf.class.php:974
[NOTICE]: Undefined index: modified

2015-Jun-02 16:48:07 /var/www/html/admin/libraries/BMO/Freepbx_conf.class.php:974
[NOTICE]: Undefined index: modified

tail: cannot open `/tmp/freepbx.log’ for reading: No such file or directory

Try to go to shell and "asterisk -rvvv"
then do “core reload”

This will give you bunch of stuff as what happens when asterisk reloads the settings. Because of the triple verbose setting “vvv” you will see pretty much all the feedback on every setting load. Perhaps you will find some problem listed that needs an intervention.

If not, your asterisk is probably do not have write privileges or something of that nature. I think Asterisk needs chown not amportal by the way.

How do I give asterisk write privileges, if that was the issue? I’ve seen that Asterisk log a million times and nothing is jumping out as me as the AH HA, THIS IS WRONG object.

How is your freepbx.log destination defined in advanced setting->System Setup

what is in that file?

Seems to be “/tmp/freepbx.log” listed.

to figure out who is the owner of the config files
go to shell and type this

stat -c %U /etc/asterisk

It should return “asterisk” if not type

chown -hR asterisk /etc/sterisk

and try again

[email protected]:~# stat -c %U /etc/asterisk

So that’s not it. :frowning:

And what’s in that file? It’s possible that the asterisk user doesn’t have access to that file on a secure Debian distro. try using


I don’t know why the log was set to /tmp/. I didn’t setup this server, so I’m not exactly sure why anything is anything with it. Anyway, here’s the readout now.

[email protected]:~# amportal a dbug

Please wait…

trying to run as user asterisk:

[FPBXDBUGDISABLE] already set to [0]

==> /var/log/asterisk/freepbx_dbug <==

2015-Jun-02 22:48:16 /var/www/html/admin/modules/queues/
[NOTICE]: Undefined variable: cos

2015-Jun-02 22:48:17 /var/www/html/admin/modules/core/
[NOTICE]: Undefined variable: db

2015-Jun-02 22:48:18 /var/www/html/admin/modules/sysadmin/
[NOTICE]: Use of undefined constant Zend - assumed ‘Zend’

==> /var/log/asterisk/freepbx.log <==
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: TRUNK_OPTIONS =
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: TRUNK_RING_TIMER = 300
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: MIXMON_FORMAT = wav
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: REC_POLICY = caller
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: RINGTIMER_DEFAULT = 15
[2015-Jun-02 22:48:18] [INFO] (core/ - Added to globals: TRANSFER_CONTEXT = from-internal-xfer
[2015-Jun-02 22:48:27] [INFO] (bin/freepbx_setting:42) - trying to run as user asterisk:
[2015-Jun-02 22:48:27] [INFO] (bin/freepbx_setting:43) -
[2015-Jun-02 22:48:28] [INFO] (bin/freepbx_setting:64) - [FPBXDBUGDISABLE] already set to [0]
[2015-Jun-02 22:48:28] [INFO] (bin/freepbx_setting:65) -
[2015-Jun-02 22:50:23] [SECURITY] (BMO/Notifications.class.php:490) - [NOTIFICATION]-[freepbx]-[FW_TAMPERED] - You have 2 tampered files (Module: “FreePBX Framework”, File: "/usr/share/asterisk/agi-bin/phpagi-asmanager.php missing"
Module: “FreePBX Framework”, File: “/usr/share/asterisk/agi-bin/phpagi.php missing”)

==> /var/log/asterisk/freepbx_dbug <==
2015-Jun-02 22:50:23 /var/www/html/admin/libraries/BMO/GuiHooks.class.php:95
[WARNING]: strtolower() expects parameter 1 to be string, object given

==> /var/log/asterisk/freepbx.log <==
[2015-Jun-02 22:52:01] [SECURITY] (BMO/Notifications.class.php:490) - [NOTIFICATION]-[freepbx]-[FW_TAMPERED] - You have 2 tampered files (Module: “FreePBX Framework”, File: "/usr/share/asterisk/agi-bin/phpagi-asmanager.php missing"
Module: “FreePBX Framework”, File: “/usr/share/asterisk/agi-bin/phpagi.php missing”)

==> /var/log/asterisk/freepbx_dbug <==
2015-Jun-02 22:52:01 /var/www/html/admin/modules/core/page.trunks.php:451
[NOTICE]: Undefined variable: dialpattern_array

2015-Jun-02 22:52:01 /var/www/html/admin/modules/core/page.trunks.php:517
[NOTICE]: Undefined variable: pr_tech

2015-Jun-02 22:52:01 /var/www/html/admin/modules/core/page.trunks.php:519
[NOTICE]: Undefined variable: data

2015-Jun-02 22:52:01 /var/www/html/admin/modules/core/page.trunks.php:532
[NOTICE]: Undefined variable: helptext

2015-Jun-02 22:52:01 /var/www/html/admin/modules/core/views/trunks/trunk_header.php:1
[NOTICE]: Undefined variable: upper_tech

2015-Jun-02 22:52:01 /var/www/html/admin/libraries/BMO/GuiHooks.class.php:95
[WARNING]: strtolower() expects parameter 1 to be string, object given

just do the

chown -hR asterisk /etc/asterisk

it will set asterisk as owner of all files and subdirectoriies in /etc/asterisk folder.

It is unlikely however that this will be a fix, it will not hurt

You can’t use commercial modules like sysadmin on a PI, phpagi.php would likely be in /var/lib/asterisk/agi-bin

How did you install this system?

I didn’t, no idea what sysadmin is and according amportal, it’s not installed.

[email protected]:~# amportal a ma uninstall sysadmin

Please wait…

The following error(s) occured:

  • Module not installed: cannot uninstall

Save your hair, start over


Hi Dicko, start all over…really?
I believe the sysadmin module is default on the freepbx distro…

That was to @BeepBoop he has an arm cpu.

So, I also get the message ‘Use of undefined constant Zend - assumed ‘Zend’’ in the freepbx debug mode.
It’s on intel cpu, but I’m not aware of this module. Should it be installed?