Search Specific CDR (v2.0)

Search specific CDR from the CDR list.

Note: This documentation applies to API version 2.0.

Request URL

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

Request parameters

Note: To perform a fuzzy search for the phone number, you can enable the fuzzy search feature using the Edit CDR Options (v2.0) interface.
Parameter Required Type Description
page No Integer Define which page is displayed.
Note: If this parameter is left blank, the response result will return the first page by default.
page_size No Integer Define how many records per page.

Maximum value: 10,000

Note: If this parameter is left blank, the response result will return 10,000 records per page by default.
order_by No String Define the display order.

Valid value:

  • asc: Ascending order.
  • desc: Descending order.
sort_by No String Define the sorting field.
Valid value:
  • uid
  • time
  • call_type
  • last_status
  • call_duration
  • routing_duration
  • handling_duration
time_begin No String Specify the start time to filter CDR.

The time format must follow the PBX's date and time display format (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.
time_end No String Specify the end time to filter CDR.

The time format must follow the PBX's date and time display format (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.
account_code No String The PIN code used to make outbound calls via a PIN-restricted outbound route and recorded in the CDR.
Note:
ext_group No String The unique ID of the extension group to only query group member's calls.
Note:
  • You can query the extension group's ID using Get Menu Options.
  • Use comma to separate multiple extension group IDs.
disposition_code_list No String The ID(s) of the call disposition code(s) of call notes.
Note:
  • You can query the disposition code ID using the Get Menu Options interface.
  • Use comma to separate multiple disposition code IDs.
call_note_remark No String The remark of call notes.
did No String Specify the DID to filter the CDR.

Valid value: {did_number}:{trunk_name} or {did_name}:{trunk_name}

Note:
ai_receptionist_list No String The unique ID of the AI receptionist to only query specific receptionist's calls.
Note:
  • You can query the AI receptionist ID using the Get Menu Options interface.
  • Use commas to separate multiple AI receptionist IDs.
ai_receptionist_status No String The processing result of calls handled by AI receptionists.

Valid values:

  • resolved: The AI receptionist successfully resolved the caller's issue without transferring the call.
  • unresolved: The AI receptionist transferred the call to another destination.
  • transfered: The AI receptionist neither resolved the caller's issue nor transferred the call.
  • noprocessingresult: The call ended abnormally due to an error or timeout, and no processing result could be determined.
campaign_list No String The unique ID of the outbound campaign to only query specific campaign calls.
Note:
  • You can query the campaign ID using the Get Menu Options interface.
  • Use commas to separate multiple campaign IDs.
disconnected_by No String The party that terminated the call.
  • Extension: Internal extension.
  • External: External number.
  • System: A party not involved in the call.
    Note: This could happen when an incoming call is not answered within the maximum waiting time, or when it is interrupted by an emergency call.
dod_number No String The phone number that was displayed on the callee's phone.
handling_duration No String The time between the call answered and the call ended, including any hold time.
Note: You can enter number, -, =, <, <=, >, >=, or a number range.
routing_duration No String The time between the call started and the call answered.
Note: You can enter number, -, =, <, <=, >, >=, or a number range.
second_participant No String The callee who received the call from the second call leg.
last_participant No String The number of the callee who received the call from the last call leg.
last_status No String The final status of the call.

Valid value:

  • ANSWERED
  • NO ANSWER
  • ABANDONED
  • BUSY
  • FAILED
  • VOICEMAIL
org_list No String The unique ID of the organization to only query specific organization's calls.
Note:
queue_list No String The unique ID of the queue to only query specific queue's calls.
Note:
  • You can query the queue's ID using Search Specific Queues interface.
  • Use commas to separate multiple queue IDs.
recording_type No Integer Whether to display all CDRs, CDRs with recordings, or CDRs without recordings.

Valid value:

  • 0: All CDRs
  • 1: CDRs with recordings
  • 2: CDRs without recordings
segments No String The number of call legs.
srcaddr No String The IP address of caller.
trunk No String Trunk name.
uid No String The unique ID of CDR.

Response parameters

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
Parameter Type Description
id Integer The sequence number of the record.
uid String The unique ID of the CDR.
time String The time when the call was made or received.
call_type String Communication type.
  • Inbound
  • Outbound
  • Internal
call_from String The number and name of the caller.
call_from_name String The name of the caller.
call_from_number String The number of the caller.
call_to String The number and name of the callee.
call_to_name String The name of the callee.
call_to_number String The number of the callee.
second_participant String The callee in the second call leg.
second_participant_name String The name of the callee in the second call leg.
second_participant_number String The number of the callee in the second call leg.
last_participant String The callee in the last call leg.
last_participant_name String The name of the callee in the last call leg.
last_participant_number String The number of the callee in the last call leg.
last_status String The final status of the call.
  • ANSWERED
  • NO ANSWER
  • ABANDONED
  • BUSY
  • FAILED
  • VOICEMAIL
queues Array<Queue> The queue information and call status.
ivrs Array The IVR number.
ring_groups Array<Ring_Group> The ring group information and call status.
call_flows Array The call flow name and number.
call_duration Integer The time between the call started and the call ended.
routing_duration Integer The time between the call started and the call answered.
handling_duration Integer The time between the call answered and the call ended, including any hold time.
call_notes Object<Call_Note> The call note of the call.
disconnected_by String The party that terminated the call.
  • Extension: Internal extension.
  • External: External number.
  • System: A party not involved in the call.
    Note: This could happen when an incoming call is not answered within the maximum waiting time, or when it is interrupted by an emergency call.
segments Integer The number of call legs.
ai_receptionist Array<AI_Receptionist> The information of AI receptionists.
source_trunks Array The call was received via which trunk.
destination_trunks Array The call was sent out via which trunk.
dids Array The phone number that the caller dialed and the associated name.
outbound_caller_ids Array The phone number that was displayed on the callee's phone.
pin_codes Array The PIN code used to make outbound calls via a PIN-restricted outbound route and recorded in the CDR.

AI_Receptionist

Parameter Type Description
name String AI receptionist name.
number String AI receptionist number.
status String The processing result of calls handled by AI receptionists.
  • resolved: The AI receptionist successfully resolved the caller's issue without transferring the call.
  • unresolved: The AI receptionist transferred the call to another destination.
  • transfered: The AI receptionist neither resolved the caller's issue nor transferred the call.
  • noprocessingresult: The call ended abnormally due to an error or timeout, and no processing result could be determined.

Call_Note

Parameter Type Description
agent_name String The name of the extension user who adds the call note.
disposition_code_list Array<Disposition_Codes> The disposition code(s) selected in the call note.
group_id String The group ID of the call note.
id String The unique ID of the call note.
registration_time Long The time when the extension user adds the call note.
remark String The remark of the call note.

Queue

Parameter Type Description
name String Queue name.
number String Queue number.
status String The call status.

Ring_Group

Parameter Type Description
name String The ring group name.
number String The ring group number.
status String The call status.

Disposition_Codes

Parameter Type Description
id Integer The unique ID of the call disposition code.
name String The label of the call disposition code.
description String The description of the call disposition code

Examples

Request example

Query the record details of the calls made by extension 1002 during 2026/06/04 00:00:00-2026/06/04 11:59:59.
Important: If you want to filter CDR by date and time, the format of time_begin and time_end MUST follow the date and time display format of your PBX, otherwise the response will not return any CDR records.
GET /openapi/v2.0/cdr/search?access_token=cnZNgpnGWZ47KqcGTRFErxWdiRPWcxXD&time_begin=2026/06/04 00:00:00&time_end=2026/06/04 11:59:59&call_from=1002 HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 1,
    "data": [
        {
            "id": "67A41F2D-E38002F3",
            "uid": "20260604103519BEC58",
            "time": "2026/06/04 10:35:19",
            "call_type": "Internal",
            "call_from": "Terrell Smith<1002>",
            "call_from_name": "Terrell Smith",
            "call_from_number": "1002",
            "call_to": "Queue 81801<81801>",
            "call_to_name": "81801",
            "call_to_number": "81801",
            "second_participant": "Phillip Huff<1001>",
            "second_participant_name": "Phillip Huff",
            "second_participant_number": "1001",
            "last_participant": "81801:Phillip Huff<1001>",
            "last_participant_name": "Phillip Huff",
            "last_participant_number": "1001",
            "last_status": "ANSWERED",
            "queues": [
                {
                    "name": "81801",
                    "number": "81801",
                    "status": "ANSWERED"
                }
            ],
            "ivrs": null,
            "ring_groups": null,
            "call_flows": null,
            
            "call_duration": 33,
            "routing_duration": 3,
            "handling_duration": 30,
            "call_notes": null,
            "disconnected_by": "Extension",
            "segments": 2,
            "ai_receptionist": null,
            "source_trunks": null,
            "destination_trunks": null,
            "dids": null,
            "outbound_caller_ids": null,
            "pin_codes": null
        }
    ]
}