Getting a list of CDRs for a call session

Method get.call_legs_report
Description Getting a list of CDRs for a call session
Available to Partner, Client

Request parameters

Title Type Required Valid values ​​ Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the agent client on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
limit number no Number of records returned. See section "Paging"
offset number no Shift determines from which record number to return "limit" records. Default is "0". See section "Paging"
filter object no See section "Filtering Criteria"
sort array no See section "Sorting data"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Sample start date
date_till iso8601 yes YYYY-MM-DD hh:mm:ss End date vybokri

Response parameters

Title Type Valid values ​​ Filtering Sorting Default response Description
id number yes yes Unique CDR identifier
call_session_id number yes yes yes Unique call session identifier (see get.calls_report method)
call_records array yes Unique identifier of the link to the recorded conversation. You can listen by calling a request in the browser:
http://app.callgear.com/system/media/talk/{call_session_id}/{уникальный идентификатор ссылки на записанный разговор}
start_time iso8601 YYYY-MM-DD hh:mm:ss yes yes Shoulder start date and time
connect_time iso8601 YYYY-MM-DD hh:mm:ss yes On-hook date and time
duration number yes yes yes Duration of the arm from the beginning of picking up the handset. Value in seconds
total_duration number yes yes yes Total length of the arm. Value in seconds
finish_reason enum yes yes yes Reason for ending the shoulder
finish_reason_description string yes yes no Description of the reason for ending the shoulder
virtual_phone_number string yes yes yes Virtual number
calling_phone_number string yes yes yes Caller ID
direction enum in, out yes yes yes Shoulder direction
is_transfered boolean true, false yes yes yes Is this a transfer shoulder?
is_operator boolean true, false yes yes yes Does this shoulder belong to the operator
employee_id number yes yes yes Unique identifier of the employee who was called
employee_full_name string yes yes Full name employee who was called
employee_phone_number string yes yes Employee phone number
employee_rating number yes yes yes Rating assigned to an employee in post-processing
scenario_id number yes yes yes Unique Script ID
is_coach boolean true, false yes yes yes Is it a coach's shoulder?
release_cause_code number yes yes yes Cause Code Number (see Q850) (deprecated is obsolete and will be removed soon)
release_cause_description string yes yes yes Description cause code (deprecated is outdated and will be removed soon)
is_failed boolean true, false yes yes yes Did the operator pick up the phone
is_talked boolean true, false yes yes Did the conversation take place
contact_id id Unique Contact ID
contact_full_name string Full name contact
contact_phone_number string The contact number from which the call was received in the case of an incoming call or the contact number to which the call was made in the case of an outgoing call
action_name string yes yes Name of the hit operation in which the call was created
group_id number yes yes Unique identifier of the group within which the call was made
group_name string yes yes Name of the group within which the call was made

Reasons for shoulder completion

Mnemonics Description
subscriber_disconnects The subscriber disconnected
no_operation No operation to process
operator_busy Employee is busy
operator_not_responsive Employee not responding
operator_disconnects The employee disconnected
operator_number_problems Problems with the employee's phone number. Contact technical support.
scenario_not_found Script not found
timeout The call time has expired
internal_error Internal error. Contact technical support.
transfer_disconnects Disabling an employee during a transfer
scenario_disconnects Disabling an employee when running a script
fax_session_done Fax received
another_operator_answer We reached another employee
subscriber_busy Subscriber is busy
subscriber_not_responsive The subscriber does not answer
subscriber_number_problems Problems with the subscriber's phone number. Contact technical support.
operator_answer We reached an employee
operator_channels_busy Out of available lines at the forwarding number
app_is_inactive Client blocked
component_is_inactive Component not active
locked_numb Calls to this number are prohibited by security settings
incorrect_input Invalid input
call_not_allowed_on_tp The call is prohibited according to the tariff plan
account_not_found Personal account not found
contract_not_found Contract not found
locked_phone Network problems
max_in_call_reached Line limit for incoming calls reached
max_out_call_reached Line limit for outgoing calls reached
employee_busy Employee talking on another call
employee_busy_after_call Employee busy after calling
phone_group_inactive_by_schedule Group of numbers is inactive according to schedule
employee_inactive Employee inactive
max_transition_count_exceeded The maximum number of transitions for script operations has been reached
phone_protocol_not_allowed_by_status Calls from this type of number are prohibited by status
employee_phone_not_found The number has been changed or deleted
action_interval_exceeded The interval specified for the operation has been exceeded
in_call_not_allowed Incoming calls are prohibited
call_enqueued Call queued
employee_status_available Employee with "Available" status
employee_auto_status_do_not_disturb Employee in automatic Do Not Disturb status
employee_status_break Employee in "Break" status
employee_status_do_not_disturb Employee in "Do Not Disturb" status
employee_status_not_at_workplace Employee with "Away" status
employee_status_not_at_work Employee with "Out of Office" status
employee_inactive_by_schedule Employee is inactive according to schedule
group_phone_inactive Group number unavailable
employee_phone_inactive Employee number is inactive
employee_phone_inactive_by_schedule Employee number is inactive according to schedule
fmc_is_locked FMC line blocked
sip_trunk_is_locked SIP trunk blocked
sip_offline SIP line is not registered
fmc_is_disabled FMC service disabled
employee_status_auto_out_call Employee in the status "Outgoing call"
limit_exceeded Financial limit reached
no_money Insufficient funds
out_call_not_allowed_by_status Outgoing calls are prohibited by status
out_call_not_allowed Outgoing calls are prohibited
internal_call_not_allowed Internal calls are prohibited
external_call_not_allowed External calls are prohibited
internal_call_not_allowed_by_status Internal calls are prohibited by status
auto_out_calls_not_allowed_by_status Outgoing calling is prohibited by status

JSON request structure```json

{ "jsonrpc":"2.0", "id":"number", "method":"get.call_legs_report", "params":{ "access_token":"string", "user_id":"number", "offset":"number", "limit":"number", "date_from":"iso8601", "date_till":"iso8601", "filter":{

},
"sort":[
  {
    "field":"string",
    "order":"string"
  }
],
"fields":[
  "string"
]

} }

### JSON response structure```json
{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "metadata":{

    },
    "data":[
      {
        "id":"number",
        "call_session_id":"number",
        "call_records":[

        ],
        "start_time":"iso8601",
        "connect_time":"iso8601",
        "duration":"number",
        "total_duration":"number",
        "finish_reason":"enum",
        "finish_reason_description":"string",
        "virtual_phone_number":"string",
        "calling_phone_number":"string",
        "called_phone_number":"string",
        "direction":"enum",
        "is_transfered":"boolean",
        "is_operator":"boolean",
        "employee_id":"number",
        "employee_full_name":"string",
        "employee_phone_number":"string",
        "employee_rating":"number",
        "scenario_id":"number",
        "scenario_name":"string",
        "is_coach":"boolean",
        "release_cause_code":"number",
        "release_cause_description":"string",
        "is_failed":"boolean",
        "is_talked":"boolean",
        "contact_id":"number",
        "contact_full_name":"string",
        "contact_phone_number":"string",
        "action_id": "number",
        "action_name": "string",
        "group_id": "number",
        "group_name": "string"
      }
    ]
  }
}

List of returned errors

See the section "List of errors for methods with the verb get"