3CX Http API User Guide

1.Introduction #

Our 3CX Http API makes it easy to integrate phone functions into your applications. By abstracting the complexities of the 3CX Call Control API into a simple-to-use API, even a novice programmer can integrate with 3CX.

1.1. What are the API Methods?

Our Http API makes it easy for even novice programmers to incorporate 3CX phone functions into your applications. With over a dozen methods to choose from, HTTP API is perfect for helping create your custom 3CX solution.

A view of all the API methods is displayed in the Appendix section of this manual.

Some of the methods that API includes are as mentioned below:

  • Barge-in
  • Drop Call
  • Listen
  • Make Call
  • Make Call Play File
  • Outbound Caller ID
  • Park Call
  • Record
  • Transfer
  • Whisper

1.2. How does it work?
The API is self-documenting. To display the syntax for a given method, simply call the method without any parameters and the API will return the required syntax along with examples. This makes working with the API simple. For example, to display the syntax for the WhisperTo method, simply call the method by browsing to http://localhost:5505/WhisperTo.aspx and the following table will display:

Figure 1: Display of Syntax for the ‘WhisperTo’ method

1.3. What’s New?
Our API extends the existing 3CX API methods, and adds new API methods. For example, our MakeCall method has the following additional features:

    • All parameters are validated to ensure extensions, queues, ring groups, and shared parking orbits exist

 

    • Enforces security by requiring a PIN for extension parameters

 

    • Adds an optional parameter to swap the outbound Caller ID before placing a call

 

    • Supports a default tenant

 

  • Adds an optional parameter to override the default tenant

2.Prerequisites #

Before installing 3CX Http API, you need to ensure that your computer meets the minimum requirements mentioned below:

  • 3CX Version 12, 12.5, 14, 15, 15.5
  • .Net Framework 4.6.1 (and above)
  • Internet Information Server 7.0 (and above)
  • The VoIPTools Relay must be installed directly on the 3CX server
  • The API can be installed on a separate server (recommended)

  • When installing SQL Server, we recommend you install it in “Mixed Mode” to include SQL Authentication, and install SQL Management Studio
  • When installing IIS, be sure to install Basic Authentication, .Net Extensibility, and ASP.Net 4.X

3.Installation #


Download software

You can order 3CX Http API on-line at http://www.voiptools.com. Your order confirmation email will include your license key and a link to download the software.

 


Install Prerequisites

There are a number of prerequisites that must be installed prior to installing 3CX Http API. These prerequisites include Microsoft Internet Information Server (IIS).

 


Install 3CX Http API

This User Guide contains step-by-step instructions to successfully install 3CX Http API. Begin by extracting the installer from the downloaded zip file (Step 1 above), then run the setup program named VoIPToolsHttpAPIInstaller.exe


Register your License Key

You must register your license key to activate 3CX Http API. Your license key is included in your order confirmation email, and can also be found in your order history on our website. A separate license is required for each server utilizing the API. You do not require license for workstations.

4.Step by Step Installation Procedure #

The following section guides you through a detailed walk-through of the installation process.

Step 1: Download 3CX Http API

You can check for the software download link included in your order confirmation email. As an alternative, you can also find the link from your order history on our website.

Step 2: Extract the installer from the downloaded .zip file

The file you downloaded in the above step is a compressed .zip file.

1. Position the mouse on the zip file and right-click.

2. From the popup menu, select Extract All to extract the software.

Step 3: Start the installation process

1. From the extracted folder, find the file VoIPToolsHttpAPIInstaller.exe

2. Double-click the file to start the VoIPToys Setup Wizard.

3. Click Next to continue.


Figure 2: Setup Wizard

Special note for Multi-tenant installations:

1. If you are installing 3CX Http API on a 3CX Cloud (Multi-tenant) server, an additional screen will display with a combo box containing a list of all installed tenants. Select the correct tenant and continue.

2. If you are installing 3CX Http API on a separate server and pointing it to a 3CX Cloud server, you will need to tell the installer the name of the specific tenant desired. Start the installer from a command window and include an additional parameter: tenantname=. Passing the tenant name to the installer will pre-fill the combo box with the correct tenant name.
For example: 3CXHttpAPI.exe tenantname=the3CXtenantname

Step 4: Download the VoIPTools 3CX Relay (if required)

3CX permits one 3rd party application to communicate with the 3CX server at a time. To overcome this limitation, VoIPTools created the 3CX Relay Service. The Relay is a lightweight application that is installed directly on the 3CX server. The Relay exposes the 3CX Call Control API (and other VoIPTools services) to all our applications, and manages requests and events between by VoIPTools products and 3CX. The Relay also makes it possible to install our VoIPTools products on a remote server (including over the internet).

1. If you have not previously installed the Relay on your 3CX Server, you can download the Relay installer by clicking on the Download Relay button. The Relay must be installed directly on the 3CX server.

2. If you are installing 3CX Http API directly on the 3CX server, you can install the Relay simply by clicking the Install/ Upgrade Relay button and following the Relay install instructions.

If you have already installed the Relay, you need not install it again unless a newer version is required.

Step 5: Test Relay Settings

1. In the Relay Services Host field, enter “localhost” if installing 3CX Http API on the 3CX server. If 3CX resides on a different server, enter the IP address or FQDN of the 3CX server.

2. In the Relay Services Port field, enter the value as 8700

The default port number is 8700 but will likely be different in multi-tenant environment.

3. Click Test Relay Settings to confirm 3CX Http API can communicate with the Relay services running on the 3CX server.


Figure 3: Test Relay Settings

4. If the 3CX Http API is successfully able to communicate with the Relay services that run on the 3CX server, Success message box appears. Click OK

5. Click Next to continue the installation.

Step 6: Run the Application

When the installation is complete, click Run Application button.


Figure 4: Run Application

Step 7: Registration

Registration is required to authorize your license key. Registering also makes it possible for VoIPTools to provide a replacement key if your license key is ever lost. Also, it enables VoIPTools to notify you of any product updates, and reminders if your key is reaching the renewal date.


Figure 5: Software Registration

Instructions to Register the software:

1. On the Settings menu, and in the License tab, enter your registration information in all the fields (Note the red dot denotes a required field).

2. Click Register.

The license key permits you to install the software on one computer. This is not free software.

5.Web Portal #

To access the ‘3CX Http API’ web portal, click the Web Portal button on the configuration program, or click on the desktop icon that was created during the installation process (3CX Http API).

The login screen is as shown below:


Figure 6: 3CX HttpAPI Home screen

6.Support #

If you need support, would like to request an enhancement to 3CX Http API, or are interested in discussing a custom solution, you can contact as at the following:

Address:   2306 Shimmering Bay Lane, Cincinnati, OH 45244-2760

Hours:       Monday – Friday (8:00 A.M. – 6:00 P.M. Central Standard Time)

Phone:      USA: +1 801-642-4655

Skype:       VoIPToys

Email:        info@VoIPTools.com

Web:          http://www.VoIPTools.com

7.Appendix #

API Methods
I. BargeinCall Method

Figure API-1: BarginCall.aspx
II. DropCall Method

Figure API-2: DropCall.aspx
III. Listen Method

Figure API-3: Listen.aspx
IV. MakeCall Method

Figure API-4: MakeCall.aspx
V. MakeCallPlayFile Method

Figure API-5: MakeCallPlayFile.aspx
VI. OutboundCallerId Method

Figure API-6: OutboundCallerId.aspx
VII. ParkCall Method

Figure API-7: ParkCall.aspx
VIII. RecordCall Method

Figure API-8: RecordCall.aspx
IX. TransferCall Method

Figure API-9: TransferCall.aspx
X. WhisperTo Method

Figure API-10: WhisperTo.aspx

Suggest Edit

Get the Best Solution for your Business

Whether through one of our commercial products, or a custom solution built to meet your specific needs, we can help you get the most out of your 3CX investment. Call us today!

Contact Us