List calls
Get a list of active conversations
Request parameters
| Name |
Type |
Required |
Valid values |
Description |
| access_token |
string |
yes |
|
Authentication session key |
| direction |
string |
no |
in, out |
Specifies which sessions to display - incoming or outgoing. If the parameter is not specified, then all sessions are displayed. |
| virtual_phone_number |
string |
no |
|
Specifies which virtual number to show active calls with. Note: the number must start with 7. |
Response parameters
| Name |
Type |
Required |
Valid values |
Description |
| call_session_id |
number |
yes |
|
A unique call session identifier that can be obtained in the response of the start.informer_call, start.vnumber_call, start.scenario_call, and start.employee_call methods, using the notification server or the DATA API.
|
| direction |
string |
yes |
in, out |
Call session direction |
| start_time |
string |
yes |
|
Call start time. Format YYYY-MM-DD hh:mm:ss |
| virtual_phone_number |
string |
yes |
|
The virtual number that was used as the caller ID (displayed number). |
| contact_phone_number |
string |
yes |
|
Subscriber number |
| external_id |
string |
yes |
|
Unique identifier of the request in the client's external system |
| List of assigned tags |
| tags |
array |
yes |
|
List of added tags |
|
tag_id |
number |
yes |
| Unique tag identifier |
|
tag_name |
string |
yes |
|
Tag name |
| Call session participants |
| legs |
array |
yes |
|
List of call session participants |
|
leg_id |
number |
yes |
|
Unique identifier of the leg |
|
calling_phone_number |
string |
yes |
|
Caller number |
|
called_phone_number |
string |
yes |
|
Called subscriber number |
|
is_operator |
boolean |
yes |
true, false |
A flag that identifies the leg that has the right to execute talk options |
|
employee_id |
number |
yes |
|
Unique employee identifier |
|
employee_full_name |
string |
yes |
|
Employee's full name |
|
record_call_enabled |
boolean |
yes |
true, false |
Conversation recording is enabled/disabled. true - enabled, false - disabled
|
|
state |
string |
yes |
|
Conversation participant status.
Possible values:
- Dial
- Conversation
- Next in line
- Disconnected
- Operators talking
- On hold
- Call Transfer
- Sending DTMF
- Receiving a fax
- Fax received
- Sending a fax
- Fax sent.
|
Example request
{
"jsonrpc": "2.0",
"method": "list.calls",
"id": "req1",
"params": {
"access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
"direction": "in",
"virtual_phone_number": "74951045771"
}
}
Example response
{
"jsonrpc": "2.0",
"id": "req1",
"result": {
"data": [
{
"call_session_id": 206597836,
"direction": "in",
"start_time": "2016-10-19T12:26:48.418",
"virtual_phone_number": "74951045771",
"contact_phone_number": "74959268686",
"external_id": null,
"tags": [
{
"tag_id": 456,
"tag_name": "Important"
}
],
"legs": [
{
"leg_id": 287866245,
"calling_phone_number": "74951045771",
"called_phone_number": "74959268686...9.2.3.3",
"is_operator": false,
"employee_id": null,
"employee_full_name": null,
"record_call_enabled": true,
"state": "Talking"
},
{
"leg_id": 287866221,
"calling_phone_number": "74959268686",
"called_phone_number": "79262444393",
"is_operator": true,
"employee_id": 2345,
"employee_full_name": "Andrew",
"record_call_enabled": true,
"state": "Talking"
}
]
}
]
}
}