API - Get list of extention numbers with active calls?

Status
Not open for further replies.

Mora

Customer
Joined
Apr 12, 2022
Messages
49
Reaction score
5
Is it possible via the API to get a list of extention numbers that are in active calls?

Thanks
 
You can do this with the undocumented 3CX Call Control API. With this API, if you can get your hands on the documentation, take a look at the ActiveConnections method.

Keep in mind that this API only responds to requests that come from LocalHost, which implies that you need to do this from the 3CX server. If you are new to the API, just understand the learning curve is very, very steep.

3CX announced several months ago that they would be releasing a new fully supported REST API and gateway service, but we have not had any recent indications of when the APIs will be released, or what will be possible with these APIs. Originally, the rumor was that these would come in SP2, but we are now on SP3 and it has been radio silence from 3CX.

We have an alternative REST API you can use today which is fully documented and supported by us (VoIPTools). Our API is far, far easier to use than the native Call Control API. ActiveConnections is one of our methods.

You have not explained why you need the list of active calls, but given that you are looking for a REST API, this implies that you are thinking about poking 3CX every few seconds to get a list of active connections. This is an inefficient approach. A better (more efficient but more complicated) approach would be to subscribe to real-time call events and keep track of active calls yourself. Since 3CX is generating these events anyway, subscribing to existing events places almost no load on the 3CX server.

I should point out that we offer a .Net SignalR "events" API that is far easier to use than the native Call Control API, and because we leverage SignalR, you can now subscribe to events from a remote computer. We offer client DLLs that make it stupid simple to connect to 3CX and subscribe to events. We also provide a Visual Studio sample project you can use as a template..
 
  • Like
Reactions: Mora and Evolute IT
Thanks!!

I have previous looked at yout tools, but couldn't find any documentation for the rest api?
 
The documentation is built into our VoIPTools Relay. You can download the Relay here. You will need to install the Relay on your 3CX server. The documentation is auto-generated from our code by Swagger, which is why we don't have an external version of the documentation. You will be able to see all the APIs, but you will not be able to execute them without a license.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,973
Messages
590,075
Members
164,895
Latest member
jasonkkrause