Command-line change extensions parameters

freepbx
Tags: #<Tag:0x00007f7023c33850>

#1

I’m looking for a way to change extensions parameters from comand line.
I need to change max_expiration for extensions or disable call waiting in a fast way. Is there any comnand-line function to do this?


(Lorne Gaetz) #2

You may be able to change max expiration with Bulk Import, which has fwconsole support: https://wiki.freepbx.org/pages/viewpage.action?pageId=37912685#fwconsolecommands(13+)-BulkImport

And for Call Forward, see this script: https://gist.github.com/lgaetz/64212eceab5e2c8381b586ba14df4fcf


#3

For using bulk-import I suppose I should first export the data and then re-import it? How can I do this?

I think the php script method is better but I can’t find documentation for the FreePBX object.

I’ve found $FreePBX->Core->getDevice($extension), but I can’t find a setDevice or writeDevice() for writing the changes.