Skip to content
drodecker edited this page Sep 3, 2021 · 9 revisions

AsterScript - The browser php script to reload Asterisk

Vicidial doesn't provide a command line interface to Asterisk, so we're left wanting.

The only script were primarily interested in running is core reload to force the refresh of asterisk extensions. This is because we found that modifying some settings, particularly in switching the homing server for a phone extension, wasn't taking effect right away.

Issuing a core reload instantly works to refresh the asterisk settings.

Switching a users phone from one server to another sometimes doesn't work right away. Vicidial seems to need more motivation to reload the asterisk phone system scripts. This is typically accomplished from the asterisk command line interface by writing core reload, however that requires an SSH connection and to download putty. For this purpose, there is a quick webpage that you can use: core_reload.php

Installation steps:

  1. Place core_reload.php in the respective web folder; e.g.: under /srv/www/htdocs
  2. Modify /etc/asterisk/manager.conf to have the following lines:
[reloaduser]
secret=resudaoler
read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,agent,user
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255
  1. Restart asterisk once manually for those user settings to take effect.

Use AsterScript

Then voilà! Just open the page http://10.1.1.17/core_reload.php and click the button to perform an asterisk reload.

When it succeeds, it should look like this:

AsterScript core reload via AMI command

Clone this wiki locally