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…

Liked this article?


Get notified of new articles
or share
You might also be interested in:
  1. CCS

    Does the call control api work with Virtual PBX v14?

    October 13, 2015 at 10:49 pm
    • @CCS – You have a V14 API Download link. Download, there is a sample project with scenarios to get started.

      October 13, 2015 at 10:51 pm
    • CCS

      Hi Nicky,

      Thanks for the link I have a project in process at the moment, this will initially be run against stand alone v14, my question is if I migrate my client(s) to the cloud version (multi tenant) can I still use the call control API

      Thanks

      October 14, 2015 at 8:40 pm
  2. Louis

    Is there an alternative to the HTTP API in V14?
    We just have upgraded to V14 from V12.5 and now our HTTP API calls return a “Runtime Error”.

    October 15, 2015 at 10:50 am
    • Louis

      Unfortunately there is no reference to an HTTP-API-call like there was on V12.x which was straightforward. We’ll just wait until it’s back in future versions :-)

      October 19, 2015 at 4:24 pm
  3. Miro

    Does the call control api read DTMF tones?

    November 11, 2015 at 11:35 pm
    • @Miro – No you cannot read DTMF Tones.
      As a rule you can think like this – Functions that require a SIP STACK or a SIP Engine (like a phone) cannot be achieved by the call control api. You will need a DTMF recognizer which is media related.
      The call control api gives you the ability to manipulate calls – Answer, end, blind transfer, reject, divert etc.
      For example you cannot make an attended transfer because the nature of an attended transfer requires you to put 1 line on hold and start a second call… so you need audio handling, drivers etc.
      Hope I was of help..

      November 12, 2015 at 11:30 am