Initiating a Call
POST /telephony/calls/@channelKey/
Example URL
https://system_domain/api/v2/telephony/calls/@channelKey/
Request Body Parameters (form-data)
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Use the value create_call to initiate a call. |
direction | string | Yes | Call direction: incoming for incoming calls, outgoing for outgoing calls. |
phone | string number | Yes | Phone number. |
call_status | string | No | Call status; see description below. |
pbx_call_id | string number | No | Call ID from PBX. |
pbx_user_ids[] | array | No | User IDs from PBX. |
user_ids[] | array | No | System staff IDs with telephony access. |
group_ids[] | array | No | IDs of staff groups in the system with telephony access. |
audio_record | file (mp3/mp4/wav/ogg) | No | Call recording. |
comment | string | No | Comment for the ticket. |
Description of call_status Parameter
Available values:
- ringing
- in-progress
- canceled
- missed
- failed
- answered
- busy
Statuses ringing and in-progress are active call statuses, meaning a call card will be displayed to the user.
The other statuses are final call statuses and will hide the call card.
info
Only one of the following parameters can be passed at a time: user_ids / group_ids / pbx_user_ids.
These parameters determine which users will see the call card. If none of these parameters are specified, the call card will be shown to all staff members with access to the telephony module. If only one employee is specified/found, they will automatically be assigned as the assignee/performer of the ticket/call.
Example Request Body (form-data)
Request to initiate a call
| Key | Value |
|---|---|
| action | create_call |
| direction | incoming |
| phone | +79998887766 |
| call_status | ringing |
| user_ids[] | 1,2,3 |
| comment | Important call! |
Example Response
{
"data": {
"call_id": 123,
"pbx_call_id": null,
"user_id": 0,
"pbx_user_id": null,
"call_status": "ringing",
"audio_record": null,
"ticket_id": 4567
}
}