Take Control of Calls on 3CX with the Call Control API

The Call Control API is an API available for 3CX V11 and upwards that allows calls to be controlled programatically. This is an advanced API that requires .NET, C# and telecommunications experience. It should only be used for larger projects. To integrate with CRM systems, use the 3CX CRM Plugin API.

Note: 3CX DOES NOT PROVIDE DEVELOPER SUPPORT for this API!

With the Call Control API, you can:

  • View all active calls on the PBX
  • Take control of a call
  • Transfers
  • Disconnect a call
  • Programmatically configure certain settings in 3CX Phone System
  1. The API is a DLL/.NET library. In order to use it you need to add a reference to the 3cxpscomcpp2.dll, which is located in the Global Assembly cache (C:\Windows\Microsoft.NET\assembly\GAC_64) and specify the application name, which must be unique, in the 3CXphonesystem.ini file (located in the 3CX Phone System directory).
  2. Go to C:\Program Files\3CX Phone System\Instance1\Bin and copy 3CXPhoneSystem.ini to the Outputs folder of your Visual Studio project.
  3. Edit 3CXPhoneSystem.ini and add to the section [ConfService] the application name, eg: PhoneSystem.ApplicationName = “UniqueName”
  4. The communication over the TCP is handled by the library and is via port 5485.

Important:

  • The API is only available on the server, i.e any application that is using it must be running on the server itself. This is because the service will not accept connections from 0.0.0.0 (ANY IP). Connections are only accepted from 127.0.0.1 (localhost).
  • The Call Control API is only available in commercial editions.

3CX API documentation, including sample applications that make the use of the API self explanatory, can be found here:

3CX API Documentation Package for 3CX V12

3CX API Documentation Package for 3CX V14

3CX API Documentation Package for 3CX V15

The Object model samples included in this package show how to:

  • Add an extension with a set of properties
  • Remove extensions
  • Update extensions
  • Add / remove a digital receptionist
  • Add a Phone by model
  • How to change Parking dial codes
  • How to change Voicemail Box Information
  • Add Fax Extensions
  • Create forwarding rules and profiles
  • Create a new prompt set
  • How to use the call control API to Barge in
  • How to use the call control API to Divert calls
  • How to use the call control API to Drop calls
  • How to use the call control API to perform Listen or whisper functions
  • How to use the call control API to Make calls
  • How to record calls
  • Transferring of calls by DN
  • Transferring of calls by ActiveConnection
  • Schedule a conference

and many other examples…