Call History (/call_history/)

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 the client call data for a certain period of time or for an unique call identifier. It is a combination of the resources "Calls (/calls/)" and “Call Data Record (/cdr/)”:

Description of Data Structures 

Resource call_history 

Name 

Type 

Mandatory 

Description 

Name 

Type 

Mandatory 

Description 

bridged_domain 

string 

no 

User domain of the subscriber whom the connection has been established with 

bridged_duration 

int 

no 

Duration of connection of two subscribers. May be null if connection with the second subscriber has not been established 

bridged_time_gmt 

string 

no 

UTC time when two subscribers were connected. May be null if no connection with the second subscriber has been established 

bridged_username 

string 

no 

Number of the subscriber whom the connection has been established with 

call_uuid 

string 

no 

Unique call identifier 

cdr 

Array[cdr_response] 

no 

Call Part Description: The cdr_response resource fields are described below 

client_owner_id 

int 

no 

Identifier of the client whom the call belongs to 

did_domain 

string 

no 

External number domain (DID – Direct Inward Dialing), which the call entered to 

did_number 

string 

no 

External number (DID – Direct Inward Dialing), which the call entered to 

duration 

int 

no 

Call duration 

ext_number_reg 

string 

no 

The external number of the extension number, which the call belongs to, if the extension number has an external number registration. Otherwise, the field has the value null 

extension_group_owner_id 

int 

no 

Group identifier of the extension number, which the call belongs to. May be null if the extension number was not a member of any group at the time of the call 

extension_id 

int 

no 

Identifier of the extension number, which the call belongs to. 

extension_name 

string 

no 

Name of the extension number, which the call belongs to. 

extension_type 

string 

no 

Type of the extension number, which the call belongs to. 

flow 

string 

no 

Call direction. May take the value in or out 

from_domain 

string 

no 

Caller domain 

from_screen_name 

string 

no 

Caller name 

from_username 

string 

no 

Caller number 

hangup_cause 

string 

no 

Reason of the call end (field may be ignored, it is used for backward compatibility) 

hangup_disposition  

string 

no 

 

Used to determine the disconnection initiator: 

  • callee_bye – the callee hung up; 

  • caller_bye – the caller hung up;

  • caller_cancel – the caller refused to wait for an answer; 

  • callee_refuse – the callee refused to answer (was busy, there was no registration, etc.); 

  • internal_cancel – the call was terminated by the server (usually due to call timeout or if the call was answered by another extension number); 

  • '' (empty) – failed to determine 

hangup_time_gmt 

string 

no 

Call end UTC time 

init_time_gmt 

string 

no 

Call start UTC time 

result 

string 

no 

Call result. Because the resource call_history consists of /calls/ and /cdr/, then you need to distinguish between the corresponding result values of these resources (see the figure at the very beginning of the article). 
For example, /calls/ (whole call) cannot have "result: answered elsewhere", and /cdr/ (call parts) cannot have "result: bridged"

start_time_gmt 

string 

no 

UTC time when the call was answered. May be null if the call was not answered 

to_domain 

string 

no 

Callee domain 

to_username 

string 

no 

Callee number 

call_month

string

no

Indication of the month of the call. In the format “yyyy-mm” (example: “2022-05”) . If specified, the response to the request will come faster.

callback

object

no

Contains information if a callback was made.

dst_num - The destination number of the call

src_num - The calling subscriber's number

src_id - id of the extension src_num

Example 

Let's get the call history for March and April of 2020: 

{   "page": 1,   "per_page": 100000,   "order": "desc",   "call_history": [     {       "flow": "in",       "init_time_gmt": "2020-03-17 14:46:43",       "start_time_gmt": "2020-03-17 14:46:43",       "bridged_time_gmt": null,       "hangup_time_gmt": "2020-03-17 14:46:48",       "duration": 5,       "bridged_duration": 0,       "extension_id": 372802,       "extension_name": "0005*101@sip.ringme.ru",       "extension_type": "phone",       "extension_group_owner_id": null,       "client_owner_id": 32362,       "result": "answered",       "from_username": "00010037",       "from_domain": "sip.ringme.ru",       "bridged_username": null,       "bridged_domain": null,       "did_number": null,       "did_domain": null,       "to_username": "0005*101",       "to_domain": "sip.ringme.ru",       "from_screen_name": "Ivanov I.I.",       "hangup_cause": "NORMAL_CLEARING",       "ext_number_reg": null,       "call_uuid": "CAE26E8A4A7041D684F7CF5C480D1047",       "hangup_disposition": "callee_refuse",       "cdr": [         {           "flow": "in",           "init_time_gmt": "2020-03-17 14:46:43.31",           "start_time_gmt": "2020-03-17 14:46:48",           "hangup_time_gmt": "2020-03-17 14:46:48",           "duration": 0,           "extension_id": 372802,           "extension_name": "0005*101@sip.ringme.ru",           "extension_type": "phone",           "extension_group_owner_id": null,           "client_owner_id": 32362,           "result": "answered",           "from_username": "0005*101",           "from_domain": "sip.ringme.ru",           "source_number": "0005*101",           "source_domain": "sip.ringme.ru",           "to_username": "0005*101",           "to_domain": "sip.ringme.ru",           "dest_number": null,           "dest_domain": null,           "did_number": null,           "did_domain": null,           "from_screen_name": "Ivanov I.I.",           "hangup_cause": "NORMAL_CLEARING",           "ext_number_reg": null,           "application": null,           "hangup_disposition": "callee_bye",           "ani_number": null,           "record_uuid": null,           "record_file_size": null         }, ...       ]     }   ] }

_id}/call_history/ 

Get the client call history 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

Request Options 

Name 

Type 

Name 

Type 

start_datetime 

string 

from_username 

array [string] 

start_bridged_duration 

integer 

flow 

array [string] 

bridged_username 

array [string] 

end_bridged_duration 

integer 

order 

string 

end_datetime 

string 

did_number 

array [string] 

per_page 

integer 

end_duration 

integer 

extension_id 

array [integer] 

to_username 

array [string] 

start_duration 

integer 

page 

integer 

Response Fields 

Name 

Type 

Name 

Type 

call_history 

Array[call_history] 

order 

string 

page 

long 

per_page 

long 

Resource call_history 

Name 

Type 

Name 

Type 

bridged_domain 

string 

bridged_duration 

long 

bridged_time_gmt 

string 

bridged_username 

string 

call_uuid 

string 

cdr 

Array[cdr_response] 

client_owner_id 

long 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition  

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

result 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string 

Resource cdr_response 

Name 

Type 

Name 

Type 

ani_number 

string 

application 

string 

call_uuid 

string 

calls_hangup_disposition  

string 

calls_result 

string 

client_owner_id 

long 

dest_domain 

string 

dest_number 

string 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition 

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

record_file_size 

long 

record_uuid 

string 

result 

string 

source_domain 

string 

source_number 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string 

GET /client/{client_id}/call_history/{call_uuid} 

Get information about the call using its unique identifier 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

call_uuid 

string 

call_month

string 

Response Fields 

Name 

Type 

Name 

Type 

bridged_domain 

string 

bridged_duration 

long 

bridged_time_gmt 

string 

bridged_username 

string 

call_uuid 

string 

cdr 

Array[cdr_response] 

client_owner_id 

long 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition  

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

result 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string 

Resource cdr_response 

Name 

Type 

Name 

Type 

ani_number 

string 

application 

string 

call_uuid 

string 

calls_hangup_disposition  

string 

calls_result  

string 

client_owner_id 

long 

dest_domain 

string 

dest_number 

string 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition 

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

record_file_size 

long 

record_uuid 

string 

result 

string 

source_domain 

string 

source_number 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string