Read-out number of extensions via API

Status
Not open for further replies.

PhonerBY

Gold Partner
Basic Certified
Joined
Mar 24, 2020
Messages
12
Reaction score
43
Hi 3CX-guys around the world,
I hope you are healthy. Can someone point me an "easy" way how to read-out the number of configured extensions from a 3CX-Server (Linux) via API etc. ?

Thank you very much !!!!

Greets from Germany
 
I don't know the built-in 3CX reports well, but perhaps there is a report you could run in 3CX that would allow you to export the data? Naturally, you would need to clean up the data so it would be a manual process.

You have not provided much information about how or why you need to access this information, so I'll take a guess at what you are trying to achieve. Perhaps you are a hosting partner that bills based on the number of extensions configured on the phone system? And you want to query your 3CX servers from a central location to generate client invoices?

There isn't an easy way to do this. You would need to create a web server running on the 3CX server that publishes your own REST API. Under the covers, you would need to connect to the 3CX Call Control API and query the extensions list and return the data via your API.

We have a complete VoIPTools REST API built in to our Relay. One of the APIs returns a list of extensions. But if I have guessed correctly why you want the list, we also are building a tool specifically for hosting partners that will query your 3CX servers from a central application and collect information (including an extension list) and build an invoice for each server. If you have ideas about what information you would like to query, let me know.
 
Hi Matthew,

thanks for your answer. And yes you're right ;-), we are going to bill each extension to our customers. I've already checked out your products and there are very cool but might too big and to be honest, too expensive at the moment, because we are at the beginning in hosting 3CX. My colleague got another hint and now we get the number of extensions direct via database-access.

Maybe we are later in business with you if we've sold a lot of 3CX instances ;-)

Thank you very much and keep healthy !!!
 
PhonerBY,

As self-serving as this may sound, you have "hinted" that you are accessing the PostgreSQL database directly. May I offer two cautions (1) 3CX Support strenuously objects to anyone accessing the PostgreSQL database directly and you could get your PBX flagged as unsupported, and (2) in order to remotely access the PostgreSQL database, you would need to make configuration changes to PostgreSQL.

I've been down that road with 3CX and they will definitely have a problem with you making those types of configuration changes to PostgreSQL (I asked for permission and they said NO). As a result, we made very significant investments to get this information via the Call Control API rather than accessing the PostgreSQL database specifically to address prohibitions communicated to us by 3CX.

Don't do it.
 
I should also point out that we have an NFR program for 3CX Partners :)
 
Hi Matthew,
after your "horror-reply" i asked my colleague again. And i gave you a wrong information. We don't read the number of extensions out of the PostgreSQL but via a existing script. So i hope, 3CX and we will stay in friendship;)
Your offer sounds good ;) If it is OK for you, i will come back to your offer as soon as we have our first bunch of customers online and ready to automate much more than now.

I'll keep you in mind :)
 
Status
Not open for further replies.

Forum statistics

Threads
111,940
Messages
589,850
Members
164,832
Latest member
Boblatino