Combining the "Save" button and "Reload" button

I have been working with FreePBX for a while now and am now getting into the code to personalize it myself. I would like to have it so when you click save on the various modules (extensions, queues, etc) that it also performs the reload for asterisk. Im having trouble finding what script gets called when the “save” button is pressed. Any Help greatly appreciated.

I would very much like to know this too. I guess developers are not willing to help with this as it’s 2 years old now?

That is not a very good approach, if you need to change, add or delete a lot of things in FreePBX, doing a reload of Asterisk on every Save is not practical.

The thing is, you change all that you want, then press the Apply changes, FreePBX than writes out all changes to the configurations files and do a reload of Asterisk.

freepbx_reloadbar.php is what generates the Orange Bar, and in particular, onclick=“freepbx_show_reload()” is the javascript that is fired.

That results in the code in freepbx_reload.php getting executed. That brings up a modal window, which then fires an ajax call back to the server to run config.php triggering the reload handler.

You can look at config.php to see what the reload handler does.

The challenge to do what you wan to do is that for each module, you would have to first process the post-back processing that is done by the module and then modify each module to effectively do the above, or something similar anyhow. (ultimately the crux being the do_reload() function.)