Reload Config from Commandline


I am having to write a link to our employee database and the PinSets module. What the link does is simply pulls in the employee’s pin code from the employees database and updates asterisk pinsets table password field where needed.

After which it I tell it to fire /var/lib/asterisk/bin/retrieve_conf so it will rebuild the config. but for some reason after firing that off. but when you go to make the call and it asks for the password, you get “Password incorrect”.

I’ve then checked the pinsets files in /etc/asterisk and they have the correct pins in there. So I then told asterisk to reload it’s self by accessing the CLI and typing “core reload”. This still did not help.

I then logged on to the web interface and noticed the red “apply config” button was showing. I pressed it and now the pins works.

I then made another change to the pinsets and logged into the shell of the server and fired off the /var/lib/asterisk/bin/retrieve_conf from there. From there i see “Please update your modules and reload Asterisk by visiting http://localhost/admin” as the last line of the output. The update modules and reload message don’t really make since to me as the modules are all up-to-date.

The asterisk version is 1.8.14, the FreePBX version is So can someone tell me what i have to do to make this work properly without having to log into web interface and hit the apply button.

/var/lib/asterisk/bin/module_admin reload

Thank you, That worked.


amportal a r

Sorry to dredge up an old thread.

I have users making changes on the web interface of FreePBX. We’d like them to submit the changes and then programmatically apply those changes. Can I schedule a cron job to run /var/lib/asterisk/bin/module_admin reload or /usr/sbin/amportal a r after hours? Is one preferred? Is that all that’s necessary to apply the submitted changes and have it take effect?

Yes. Please do amportal a r and remember root has to be running it.

1 Like