Call Statistics (/calls/stats/, /cdr/stats/)

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

This resource allows you to get a summary data on calls for a specified time period or for a specific internal number (total quantity, quantity of missed calls, etc.). Events on the extension can be found here. When sending requests, you should take into account limits for request quantity to API.  

Description of Data Structures 

Resource call_stat, cdr_stat

Name 

Type 

Mandatory 

Description 

Name 

Type 

Mandatory 

Description 

answered 

long 

yes

Quantity of answered calls 

bridged 

long 

yes

Calls connected to the end subscriber. Difference from answered: the call may be answered, but without connecting to the end subscriber (for example, the call was accepted by the queue, but nobody was able to accept it, then the call is answered, but bridged

bridged_duration 

long 

yes

Total duration of the bridged calls, in seconds 

busy 

long 

yes

Quantity of calls declined with "busy" signal 

duration 

long 

yes

Total duration of the answered calls, in seconds 

failed 

long 

yes

Calls declined for other reasons (not busyrejected, or not answered

not answered 

long 

yes

Quantity of calls that were not answered 

rejected 

long 

yes

Quantity of calls declined by the callee 

total 

long 

yes

Total quantity of calls 

answered elsewhere

long

yes

The call was not answered by the recipient, but was answered by someone else (during simultaneous calling of internal numbers through the queue or simultaneous transfer ("simple transfer") to several numbers at once);

diverted

long

yes

The call was transferred on the receiving device

Example 

Get the summary data for the first 10 days of November 2019: 

 

{   "in": {     "busy": 0,     "bridged_duration": 6142,     "answered": 15,     "not answered": 5,     "rejected": 0,     "failed": 8,     "bridged": 59,     "duration": 6386,     "total": 87   },     "out": {     "busy": 0,     "bridged_duration": 958,     "answered": 0,     "not answered": 37,     "rejected": 0,     "failed": 22,     "bridged": 87,     "duration": 958,     "total": 146   } }

"Client" Section Resources 

GET /client/{client_id}/calls/stats/ 

GET /client/{client_id}/cdr/stats/

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

Request Options 

Name 

Type 

Name 

Type 

start_datetime 

string 

end_datetime 

string 

extension_id 

Array[integer] 

Response Fields 

Name 

Type 

Mandatory 

Description 

Name 

Type 

Mandatory 

Description 

in 

call_stat/cdr_stat 

no 

Summary data on incoming calls 

out 

call_stat/cdr_stat 

no 

Summary data on outgoing calls 

Resource cdr_stat

Имя

Тип

Имя

Тип

answered

long

bridged

long

bridged_duration

long

busy

long

duration

long

failed

long

not answered

long

rejected

long

total

long

diverted

long

answered elsewhere

long

Resource call_stat 

Name 

Type 

Name 

Type 

answered 

long 

bridged 

long 

bridged_duration 

long 

busy 

long 

duration 

long 

failed 

long 

not answered 

long 

rejected 

long 

total 

long