Skip to content

List calls

Receiving a list of active calls

Method list.calls
API version v4.0
Description Receiving a list of active calls and their participants
Go back to list of methods
Parameters of a request
Title Type Required Valid value Description
access_token string yes Authentication session key
direction string no in, out Defines what sessions should be shown - incoming, outgoing. If the parameter is not given, all the sessions are shown.
virtual_phone_number string no Defines active calls from what virtual number to show.
Number should begin with a 7
Parameters of a reply
Title Type Required Valid value Description
call_session_id number yes Unique ID of a call session, that you can get in a reply message after calling the methods start.informer_call, start.vnumber_call, start.scenario_call, start.employee_call, via a notification server or REST API.
direction string yes in, out Direction of call session
start_time string yes Call start time. Format YYYY-MM-DD hh:mm:ss
virtual_phone_number string yes Virtual number, that was used as a representative's number.
contact_phone_number string yes Number of a subscriber
external_id string yes Unique ID of a request in an outside system of a client
List of tags
tags array yes List of tags
tag_id number yes Unique tag ID
tag_name string yes Tag name
Call session legs
legs array yes List of call session legs
leg_id number yes Unique ID of a leg
calling_phone_number string yes Number of a calling subscriber
called_phone_number string yes Number of a called subscriber
is_operator boolean yes true, false Indentifies a leg that can manage talk options.
employee_id number yes Unique ID of an employee
employee_full_name string yes Name of an employee
record_call_enabled boolean yes true, false

Call recording switched on/switched off.
true - switched on, false - switched off

state string yes

Status of a call leg

Possible values:
  • Redial
  • Conversation
  • Next in line
  • Disconnect
  • Operators' conversation
  • On hold
  • Transferring call
  • Sending dtmf
  • Receiving fax
  • Fax received
  • Sending fax
  • Fax sent
Example of a request
{
  "jsonrpc": "2.0",
  "method": "list.calls",
  "id": "req1",
  "params": {
    "access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
    "direction": "in",
    "virtual_phone_number": "74951045771"
  }
}
Example of a reply
{
  "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": "Relevant"
          }
        ],
        "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": "Talk"
          },
          {
            "leg_id": 287866221,
            "calling_phone_number": "74959268686",
            "called_phone_number": "79262444393",
            "is_operator": true,
            "employee_id": 2345,
            "employee_full_name": "Test",
            "record_call_enabled": true,
            "state": "Talk"
          }
        ]
      }
    ]
  }
}