This page describes how you can trigger events each time an extension receives or places a phone call.
This is the Call Events Guide. It explains the Service interface and the responses of the service. The Call Events is a web service that enables developers to interact with the system every time an Extension receives, terminates or places a call.
The following events are supported by the service:
A Call Event has the following properties:
|Event type||This is the event on which the associated script is executed.|
Can be set to Dial-In, Dial-Out or Hangup.
HTTP method that is used when executing the script.
|Script URL||URL address of the script that is executed when the event occurs.|
And occurs as described below:
STEP 1: When a event occurs on an Extension, the system verifies if that event requires that a request is made.
STEP 2: If there is an event, the system will make a HTTP request to URL using the associated HTTP method .
The system adds extra parameters to the request depending on the method used:
The call's unique identifier.
The caller's CallerID number.
The caller's CallerID name.
The public number of the called extension (if available).
The extension that received the call. Supported format: extended extension number (e.g.
The call status. This parameter is set to the following values, depending on the event type.
For the Dial-In and the Dial-Out event types, the parameter is set to CALLING.
For the Hangup event type, the parameter can have one of the following values:
The call flow:
The extension that made the call. Supported format: extended extension number (e.g.
The number that was dialed by the caller (can be an external number:
The call ID that is auto-generated and maintained for the entire duration of the call, no matter how many transfers are performed. This variable can be used to identify in the events the calls started using a UnifiedAPI request.
In order to be able to use Call Events, you must first assign it on an Extension. The system supports two methods to assign a Call Event.
The system allows you to add call events using the web management interface. More details can be found here.
A Call Event can be added using the UnifiedAPI PhoneCallEvents Service.
Check how it can be used in the TrackMyCalls example.