Search CDR

Search Call Detail Records (CDR).

MCP tool

search_cdr_v2

Tool parameters

You can specify the following parameters in your request.

Parameter Required Description
page No The page number to retrieve (default: 1).
page_size No Define how many records to return per page. Maximum value: 10,000. If this parameter is left blank, 10,000 records are returned per page by default.
time_begin No Specify the start time to filter CDR. The time format must follow the PBX's date and time display format. For example, use MM/DD/YYYY HH:mm:ss for Month/Day/Year with 24-hour time, or YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM for Year/Month/Day with 12-hour time.
time_end No Specify the end time to filter CDR. The time format must follow the PBX's date and time display format. For example, use MM/DD/YYYY HH:mm:ss for Month/Day/Year with 24-hour time, or YYYY/MM/DD HH:mm:ss AM or YYYY/MM/DD HH:mm:ss PM for Year/Month/Day with 12-hour time.
call_from No The number of the caller.
call_to No The number of the callee.
call_type No Filter by communication type. Valid values: Inbound, Outbound, or Internal.
trunk No The name of the trunk.
did No Specify the DID to filter CDR. Valid formats: {did_number}:{trunk_name} or {did_name}:{trunk_name}. You can query trunk names using Search Specific Trunks. Use commas to separate multiple DIDs.
queue_list No The unique ID of the queue to filter calls. Use commas to separate multiple queue IDs.
ring_group_list No Filter calls by ring group IDs. Use commas to separate multiple IDs.
ivr_list No Filter calls by IVR IDs. Use commas to separate multiple IDs.
ext_list No Filter by extension number in the caller, callee, or participant fields.
last_status No The final status of the call. Valid values: ANSWERED, NO ANSWER, ABANDONED, BUSY, FAILED, or VOICEMAIL.
disposition_code_list No The ID(s) of the call disposition code(s) in call notes. Use commas to separate multiple IDs. You can query disposition code IDs using Get Menu Options.
ai_transcription No The AI transcription content.
sort_by No Define the sorting field. Valid values: uid, time, call_type, last_status, call_duration, routing_duration, or handling_duration.
order_by No Define the display order. Valid values: asc (ascending) or desc (descending).

Examples

The following example demonstrates how to use a natural language request in Codex to call this tool and search CDR.

View recent call records

Prompt example

List yesterday's call records on my PBX.

Response example

Specify search conditions

Prompt example

Find outbound calls from extension 1004. Show the first 10 records.

Response example