- Help center
- Developers
- Voice
Integration - Call API
Overview
Integration → Call API supports initiating a call and downloading of call recording via HTTP requests:
Dial parameters
- outbound queues are supported via prefixes, in the same way as dialed from a desk phone
- to notify a 3rd party about call events via HTTP callbacks configure URL adapter parameter in the link:
- an example of URL adapter for event handling:
- to create a sample URL adapter paste the following link onto the form (parameters will be parsed automatically)
Linking events to calls
- the dial API returns an integer request ID as JSON ({RequestID:00000}), for example
- this RequestID is passed to the event callback via {{DialApiRequestID}} placeholder in the corresponding URL adapter
- the adapter also supports {{CallID}} placeholder which together with the {{DialApiRequestID}} allow to link calls to the corresponding API request
- every call to the dial API initiates a pair calls: one to dial the agent and another to dial the requested number, for example
- in the event callback there are 2 placeholders available to differentiate between different events belonging to those calls: {{CallTypeName}} and {{DialApiEventName}} (see the table below)
{{CallTypeName}} | {{DialApiEventName}} | Description |
API | pickup | agent picked the phone |
API | missed | agent missed the call |
API | hangup | agent hung up the call |
Outgoing | pickup | dialed party picked the phone |
Outgoing | missed | dialed party missed or rejected the call |
Outgoing | hangup | dialed party hung up the call |
Some examples of event callback requests made via the sample adapter described above:
https://test/identity.asp?CallType=API&Event=pickup&CallID=1000000087849&RequestID=513&EventCode=2&IsCallRecorded=&Guid=bfa2dbc8-ab8a-34c8-f243-c2aad8c446ff https://test/identity.asp?CallType=Outgoing&Event=pickup&CallID=1000000087850&RequestID=513&EventCode=2&IsCallRecorded=&Guid=923041af-adb5-a8ae-f29c-e60ea5e17448 https://test/identity.asp?CallType=Outgoing&Event=hangup&CallID=1000000087850&RequestID=513&EventCode=1&IsCallRecorded=1&Guid=923041af-adb5-a8ae-f29c-e60ea5e17448 https://test/identity.asp?CallType=API&Event=hangup&CallID=1000000087849&RequestID=513&EventCode=1&IsCallRecorded=1&Guid=bfa2dbc8-ab8a-34c8-f243-c2aad8c446ff
The above examples are for the pair of calls (API and Outgoing) generated via a single request to the dial API that returned {RequestID:513} where both the agent and the dialed party picked up the call.