Create extensions : solved

Hello,
I have freepbx15 and “PBX API” module installed. Please anyone can help me to create extentions using API ?
Thank you very much

1 Like

Hello essaaf,

Here’s the thing, the API is here to enable integration between the PBX and other services. You can do a bunch of things with the API, and of course you can have it working with many different services.
So, can you please explain what you are trying to accomplish, what you’ve already done, and the maximum details possible of your setup?

Once we’ll have that, we’ll hopefully be able to guide/help you with your project.

In any case, there’s great documentation here: https://wiki.freepbx.org/display/FPG/API

Much luck, happy New Year!

Did you even look at our wiki on the API yet. Nobody is going to give you step by step how to do something. Go explore. It’s all Open Source. https://wiki.freepbx.org/display/FPG/API

Please explain what you are trying to accomplish. For example “I am migrating from an Acme Widgets PBX and would like to use their Extensions Report to create equivalent extensions in FreePBX. There are about 300 extensions.”

Please explain why you rejected the idea (proposed in your other thread) of putting the data into a .csv file and using Bulk Import.

I have an android application and I would like to be able to auto-create extensions.

With you an idea how can I do that? The documentation of the API does not mention of the creation of extentions. Thank you

Each time a new instance of your app is registered, just create an extensions.csv file with one entry and execute
fwconsole bi --type='extensions' extensions.csv
and then
fwconsole reload

Create one or more extensions manually and export them with Bulk Handler, to see the format your .csv file should have.

If this won’t work for you, please explain the problem in more detail.

Hello Thank you for your response. I want to use this api http://IP/admin/config.php?display=api

How can i do ? i dont want to use .csv file

“gql:core:write:extension” is the correct parameter to create extentions with api ?

Any help please ?

Hi essaaf,

We asked you for exact details on your setup and what you are trying to accomplish, but we never got correct answers.

IMO: you should hire a developer with knowledge in FreePBX, Asterisk, GraphQL, REST etc. to build that project for you.

You can find developers on upwork, freelancer and Sangoma also offers custom development.

As mentioned, the wiki has great documentation, and the community is here to help and answer questions.

Hope that helps.

1 Like

I Just Need 1 command : create extention with command Line. It’s so hard to do it ??

An API isn’t just one line of code, sorry.

Also, FreePBX 15 isn’t yet stable anyway for production, so if you feel you can pull it off on your own, what can you lose with trying that one command?..

Sorry.

Look at this and see if it helps?
https://wiki.freepbx.org/display/FPG/API+Scope+Visualizer

Thank for your reply Comtech

Thank you all for your help. finally solved with bulk handler. :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.