- Created by esnata, last modified on Jun 26, 2021
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 2 Next »
You can test API methods in the API online browser page and without writing any code
Some resources described in the page may not be available by default due to the application type (see Application Creation and Authorization)
This resource allows you to get client call data for a certain period of time or for a 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 |
---|---|---|---|
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:
|
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). |
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 |
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 |
---|---|
client_id | string |
Request Options
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 |
---|---|
call_history | Array[call_history] |
order | string |
page | long |
per_page | long |
Resource call_history
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 |
---|---|
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 |
---|---|
client_id | string |
call_uuid | string |
Response Fields
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 |
---|---|
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 |
- No labels