Search specific CDR

Search the specific CDR from the CDR list.

Request URL

GET {base_url}/{api_path}/cdr/search?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
start_time No String Specify the start time to filter CDR.
Note: The time format depends on the date and time display format of PBX (set in System > Date and Time > Display Format on PBX).

Examples:

  • If the display format is Month/Day/Year and is 24-hours format, then the valid time format is MM/DD/YYYY HH:mm:ss.
  • If the display format is Year/Month/Day and is 12-hours format, then the valid time format is YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM.
end_time No String Specify the end time to filter CDR.
Note: The time format depends on the date and time display format of PBX (set in System > Date and Time > Display Format on PBX).

Examples:

  • If the display format is Month/Day/Year and is 24-hours format, then the valid time format is MM/DD/YYYY HH:mm:ss.
  • If the display format is Year/Month/Day and is 12-hours format, then the valid time format is YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM.
call_from No String The number of caller.
call_to No String The number of callee.
extension_group No Integer The unique ID of the an extension group to only query group member's calls.
Note: You can query the extension group's ID using Get Menu Options.
status No String call status.
Valid value:
  • ANSWERED
  • NO ANSWER
  • BUSY
  • FAILED
  • VOICEMAIL
enable_fuzzy_search No Integer Whether to search for the fuzzy equivalent for the phone number.
Valid value:
  • 0: Disable
  • 1: Enable

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of the searched CDR.
data Array<CDR_Details> The detailed information of the CDR.
CDR_Details
Table 3.
Parameter Type Description
id Integer The sequence number of the record.
time String The time the call was made or received.
call_from String The number or/and the name of the caller.
call_to String The number or/and the name of the callee.
timestamp Integer The timestamp of the time that the call was made or received.
uid String The unique ID of the CDR.
src_addr String The IP address of the caller's device.
src_trunk String The call was received via which trunk.
dst_trunk String The call was sent out via which trunk.
duration Integer The time between the call started and the call ended.
ring_duration Integer The time between the call started and the call answered.
talk_duration Integer The time between the call answered and the call ended.
disposition String Call status.
  • ANSWERED
  • NO ANSWER
  • BUSY
  • FAILED
  • VOICEMAIL
call_type String Communication type.
  • Inbound
  • Outbound
  • Internal
did_number String The phone number that the caller dialed.
dod_number String The phone number that was displayed on the callee's phone.
record_file String The name of the call recording file.
reason String The reason why the call was ended.

Examples

Request example

Query the record details of the calls made by extension 2005 during 05/30/2022 00:00:00-05/30/2022 23:59:59.
Important: If you want to filter CDR by date and time, the format of start_time and end_time MUST follow the date and time display format of your PBX, otherwise the response will not return any CDR records.
GET /openapi/v1.0/cdr/search?start_time=05/30/2022 00:00:00&end_time=05/30/2022 23:59:59&access_token=s4f8lGJgh28PuXt8KNsoPJCDcfjt21Uj&call_from=2005 HTTP/1.1
192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 3,
    "data": [
        {
            "id": 2710,
            "time": "05/30/2022 14:53:41",
            "call_from": "Kristin Hale<2005>",
            "call_to": "1000",
            "timestamp": 1653893621,
            "uid": "202205301453416CEAB",
            "src_addr": "192.168.28.25",
            "dst_trunk": "peer-to-34",
            "duration": 7,
            "talk_duration": 7,
            "disposition": "ANSWERED",
            "call_type": "Outbound",
            "dod_number": "2005",
            "reason": "src hangup    "
        },
        {
            "id": 2711,
            "time": "05/30/2022 14:55:00",
            "call_from": "Kristin Hale<2005>",
            "call_to": "21000",
            "timestamp": 1653893700,
            "uid": "2022053014550020730",
            "src_addr": "192.168.28.25",
            "dst_trunk": "peer-to-34",
            "disposition": "NO ANSWER",
            "call_type": "Outbound",
            "dod_number": "2005",
            "reason": "dst extension_busy_no_forward    "
        },
        {
            "id": 2712,
            "time": "05/30/2022 14:55:49",
            "call_from": "Kristin Hale<2005>",
            "call_to": "21000",
            "timestamp": 1653893749,
            "uid": "202205301455494E686",
            "src_addr": "192.168.28.25",
            "dst_trunk": "to28.41",
            "duration": 54,
            "ring_duration": 2,
            "talk_duration": 52,
            "disposition": "ANSWERED",
            "call_type": "Outbound",
            "dod_number": "2005",
            "record_file": "20220530145555-1653893749.6-2005-21000-Outbound.wav",
            "reason": "dst hangup    "
        }
    ]
}