Get List of Extension or Create Extension through REST API

Hello @karthick,

You can write a web service that will help to execute console commands on the Freepbx server.
You will send a URL with specific parameters from your application like extension number, extension name, password, outbound cli etc, and then issue the fwconsole command with the received parameters in your web service.

I suggest you to first export the configuration (bulk handler module) so you can check the csv format of an extension, and then issue the fwconsole bi command from the console to see if it is working.

fwconsole bi --type='extensions' extensions.csv

Then you need to send the fwconsole reload command to apply the settings.

If you really want to add, edit or delete extensions, you can explore the bulk handler module and use the main functions in your web service.

Thank you,

Daniel Friedman
Trixton LTD.

2 Likes