Mass update of extensions


i had replied to another post with my question but cant seem to find it anywhere in the forum. so here i go again.

i have changed the outgoing caller id of all extensions in mysql outside of freepbx. now i am trying to get the pbx to actually use the new caller ids. i am running into the usual problem as many times before that i would have to point a browser to every extension and press submit and at the end press the ‘red bar’ to apply the changes. how can i do this on the command line ? there must be a way to somehow make the system aware of the changes without the use of a browser ? i would not mind a short downtime if required. i only need this on occasion and not frequently.


/var/lib/asterisk/bin/module_admin reload


thanks for that but it does not what i need. changes that i make in mysql WITHOUT freepbx are still not applied. they are shown in freepbx but dont seem to go into the actual asterisk configuration. i still need to click submin on EACH extension changed and the apply the changes. i don’t mind to apply via webinterface but i can not submit every single extension again.

any solution for that ? parallel i am working on a solution using curl but that is not yet anywhere near success. so any help would still be very much appreciated.


The asterisk db is not updated. The asterisk conf files are updated with a reload.
You should find a solution to update the asterisk db.


hi again,

well, what exactly is involved i have no clue. i need a solution to not need to click submit on all extensions. if the asterisk db update is the trick then what command do i need to issue to make that happen ?

in asterisk i get these options regarding database:

bell*CLI> database
del deltree get put show showkey

nothing about update.


All of the information you have been provided has been correct, but it’s not the entire story.

Changing peer data is quite complicated as it has to be stored in the MySQL database then parsed out by retrieve_conf. This updates the ASTDB and writes new config files.

Currently the API is not exposed nor documented.

Also just changing the value in the db does not set update flags so the downstream data will not be updated simply by running the script.

You can make the change you want with the bulk extension module. If you need coding examples the bulk extension is the easiest to follow.