FreePBX | Register | Issues | Wiki | Portal | Support

Create extensions : solved


(me) #1

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


(Itzik) #2

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!


(Tony Lewis) #3

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


#4

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.


(me) #5

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


#6

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.


(me) #7

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


(me) #8

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


(me) #9

Any help please ?


(Itzik) #10

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.


(me) #11

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


(Itzik) #12

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?..


(me) #13

This post was flagged by the community and is temporarily hidden.


(Itzik) #14

Sorry.


#15

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


(me) #16

Thank for your reply Comtech


(me) #17

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


(system) #18

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