Call Control API for Windows (2024)

  • Introduction
  • Prerequisites
  • Windows
  • Deploying the Sample Scripts
  • Sample 1 - Extension Status
  • Sample 2 - Force PBX Hours
  • Sample 3 - Personal Parking with Auto Return
  • Sample 4 - Queue Agent Status
  • Sample 5 - User Input IVR
  • See also

Introduction

The new Call Control API for V20 can be downloaded here.

This zip file includes:

  • A Help folder with an HTML documentation of the API. The documentation details all methods available for your custom applications to interact with 3CX. It may be browsed by opening file “index.html” with your browser.
  • An OMSamples folder with C# samples demonstrating how to use the API.

Prerequisites

IMPORTANT: The following is meant to be run in a development environment, not on a production 3CX machine.

Windows

Install 3CX v20 (Alpha). Onthe same machine ensure you have the latest Visual Studio 2022 Community or Enterprise edition, which comes with .NET core 8.0 SDK.

From your Start menu, run Command Prompt, go in the OMSample folder using command:

cd “xxx\3CXConfigurationAndCallControlAPIV20\OMSamples”

Compile using command:

dotnet build OMSamplesCore.csproj

If successful it will say:

Build succeeded.

0 Warning(s)

0 Error(s)

Copy folder Scripts into the output folder using command:

xcopy Scripts bin\Debug\net8.0\Scripts /E/H

Type D when asked if that is a directory.

Now that the sample executable is compiled, go in the output folder using command:

cd bin\Debug\net8.0

And run the sample executable using command:

OMSamplesCore

Deploying the Sample Scripts

Once the sample executable is run, you are now in an interactive shell which allows you to deploy sample scripts to your local 3CX system.

Sample 1 - Extension Status

Input the following to deploy the Extension Status sample:

>scriptdev deployall folder=Scripts/ExtensionStatus

It should say that #0 to #4 have been updated.

Log into your Web Client as the System Owner. Go to Admin>Advanced>Call Flow Apps. You will see that 5 CFDs have been created and are registered.

Those dial codes can now be called from any dialer to change their current user status.

NOTE: Temporary status override will not be reset.

Usage:

  • Dial #0 and hang up, your status will be set to Available.
  • Dial #1 and hang up, your status will be set to Away (see your presence color indicator changing in top right corner of the webclient).
  • Dial #2 and hang up, your status will be set to Do not disturb.
  • Dial #3 and hang up, your status will be set to Lunch (Custom 1).
  • Dial #4 and hang up, your status will be set to Business Trip (Custom 2).

Sample 2 - Force PBX Hours

Available in V20 Update 1 or 2.

Input the following to deploy the Force PBX Hours sample:

>scriptdev deployall folder=Scripts/ForcePBXHours

It should say that #60 to #64 have been updated.

Log into your Web Client as the System Owner. Go to Admin>Advanced>Call Flow Apps. You will see that 5 more CFDs have been createdand are registered (Update 1 or 2 required, will show as unregistered otherwise).

Those dial codes can now be called from any dialer and will switch the entire PBX to specific hours.

As you may have noticed, in V20 the legacy in office/out of office dial code has been removed.

Here is an example of a RoutingPoint which can implement any vision of its equivalent in a multi department model.

Usage:

  • Dial #60 and hang up to reset all departments to default hours operation.
  • Dial #61 and hang up to force all departments in office hours.
  • Dial #62 and hang up to force all departments out of office hours.
  • Dial #63 and hang up to force all departments to break time.
  • Dial #64 and hang up to force all departments to holiday time.

Sample 3 - Personal Parking with Auto Return

Input the following to deploy the Personal Parking With Auto Return sample:

>scriptdev deployall folder=Scripts/PersonalParkingWithAutoReturn

It should say that # has been updated.

Log into your Web Client as the System Owner. Go to Admin>Advanced>Call Flow Apps. You will see that 1 more CFD has been created and registered.

This dial code can now be called from any dialer to park calls. Those calls will be put on hold with parking music and will attempt to return to the extension once available / no longer on a call and not in DND.

Usage:

  • Have an inbound call from caller A to your extension and blind transfer it to #.
  • Caller A will hear hold music. Hang up from your end.
  • Put yourself in a call, to 999 for example then hang up after a while.
  • Call with caller A will be returned to you automatically.

Sample 4 - Queue Agent Status

Input the following to deploy the Queue Agent Status sample:

>scriptdev deployall folder=Scripts/QueueAgentStatus

It should say that #30 and #31 have been updated.

Log into your Web Client as the System Owner. Go to Admin>Advanced>Call Flow Apps. You will see that 2 more CFDs have been created and registered.

This dial code can now be called from any dialer to change their queue login status.

Usage:

  • Create a queue from Call Handling and add yourself as an agent.
  • Go to the Panel view of your Web Client to see your agent status.
  • Dial #31 to log out from all queues where your extension is an agent. Hang up. Watch the “Queue logged in to” column change.
  • Dial #30 to log in all queues where your extension is an agent.

Sample 5 - User Input IVR

Available in V20 Update 1 or 2.

Input the following to deploy the User Input IVR sample:

>scriptdev deployall folder=Scripts/UserInputIVR

It should say that #8877 has been updated.

Log into your Web Client as the System Owner. Go to Admin>Advanced>Call Flow Apps. You will see that 1 more CFD has been created and registered.

This dial code can now be called from any dialer to simulate a DTMF Input IVR where a list of predefined PINs are associated with a list of routes to transfer the caller.

See readme.txt found in Scripts/UserInputIVR for more information.

See also

  • Call Control API for Linux
  • Creating a Call Processing Script
  • Call Processing Script for DTMF Input

Last Updated

This document was last updated on 6 March 2024

https://www.3cx.com/docs/call-api-windows/

Call Control API for Windows (2024)
Top Articles
Latest Posts
Article information

Author: Rob Wisoky

Last Updated:

Views: 6447

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Rob Wisoky

Birthday: 1994-09-30

Address: 5789 Michel Vista, West Domenic, OR 80464-9452

Phone: +97313824072371

Job: Education Orchestrator

Hobby: Lockpicking, Crocheting, Baton twirling, Video gaming, Jogging, Whittling, Model building

Introduction: My name is Rob Wisoky, I am a smiling, helpful, encouraging, zealous, energetic, faithful, fantastic person who loves writing and wants to share my knowledge and understanding with you.