Extension update from CLI

I want to know if there is any way to update an extension from CLI

I would like to do it directly on the database, but in other forums say it is not a good idea.

Any suggestions?

Although a Harsh response,?

Remove Freepbx if you don’t want the GUI.

From my understanding
freepbx generates all the config files required on reload
but I am not sure if they are generated ONLY from the DB or from other sources.

Although I am sure with the right entries in the DB along with any other files it should be a doable thing.

Do the edits and fire off an “amportal reload”.
That works for me but I am not editing such things as extensions directly.

Hv.

Bulk Import fwconsole commands may do what you need
http://wiki.freepbx.org/pages/viewpage.action?pageId=37912685#fwconsolecommands(13+)-BulkImport

If you can elaborate, we might be able to help.

The bulkimport from fwconsole might be a good start, but some updates don’t require that much control. What, specifically, are you trying to update?

You may also want to look at ARI or AMI to see if those interface can help you update some information.

To elaborate on what @hiddenvision said - the information about the extensions comes from or is managed in several places, including config files in /etc/asterisk, the asterisk real-time database, and the FreePBX MySQL database. When you restart the system, it takes all of the information from these locations and configures your extensions.

I have more than 1000 extensions continually changing its name. I want that when the user update your information in LDAP, is updated in FreePBX. somehow connecting it with a script
That’s my initial idea, but if anyone knows a way to update extensions based on a parameter of LDAP, help me a lot
I tried:
fwconsole bi --type=‘extensions’ extensions.csv
But only it serves to create extensions, but not to modify

I think you can create and delete from the csv
(first colum is the action if I remember right)

But if it just the Names then I would think you will find a pretty easy method.

Hv.

This sounds like a terrific, if arcane feature. I recommend you go to the “Issues” page at the top and put in a feature request. There is already a lot of LDAP integration, so adding some more should make the system even more facile in this area and improve LDAP integration.

Of course, if you go that route and it does exist, they’ll get grumpy and send you back here with the information on how to do it. :slight_smile: We all win.

Ok,
Looking at the tables of the database, I found three tables in which the name is saved. These are “devices”, “users”, “userman_users”.
manually updating these tables, I found no problem with the web management.

Now my problem is I can not find how to change the voice mail mailbox in the database. changing it does not work directly /etc/asterisk/voicemail.conf