Manage extensions with ARI


My question is can we manage the extensions.conf and sip.conf using ARI/AMI/AGI? Please point me to the right way. Also, can i restart the asterisk server from the API?

If not then will it be safe if I write all this using some server side script

You can’t manage them using ARI. From AGI if you wrote your own thing that modified the config files you potentially could. AMI has some rudimentary ways to do dialplan stuff, but it is not frequently used.


Of course it can be done with AMI; how do you think FreePBX works?

identifies specific actions for manipulating dialplans, and also general actions for manipulating config files.

FreePBX doesn’t use AMI for that, it generates the config files directly and then issues the reload.

Thanks @jcolp. I will explore AGI then

As @jcolp said, you can do some rudimentary configuration using AMI, or use AGI for create your own call flow, also a good way could be use Asterisk realtime for store configuration files on a DB and then manipulate directly from any compatible DB client