Download a CDR File (v2.0)

Download a CDR file of specific extensions or all extensions.

Note: This documentation applies to API version 2.0.

Steps to download a CDR file

Request URL

GET {base_url}/{api_path}/cdr/download?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
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.
ai_transcription No String The AI transcription content.
Note: You can obtain leg_id from Download AI Call Transcription Data (v2.0), then use it to retrieve the corresponding transcription content via Get AI Call Transcript (v2.0) or Get AI Call Summary (v2.0).
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.
last_status No String The final status of the call.

Valid value:

  • ANSWERED
  • NO ANSWER
  • ABANDONED
  • BUSY
  • FAILED
  • VOICEMAIL
last_participant No String The number of the callee who received the call from the last call leg.
order_by No String Define the display order.

Valid value:

  • asc: Ascending order.
  • desc: Descending order.
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
second_participant No String The callee who received the call from the second call leg.
segments No String The number of call legs.
sort_by No String Define the sorting field.
Valid value:
  • uid
  • time
  • call_type
  • last_status
  • call_duration
  • routing_duration
  • handling_duration
srcaddr No String The IP address of caller.
trunk No String Trunk name.
uid No String The unique ID of CDR.
call_type No String Communication type.

Valid value:

  • Inbound
  • Outbound
  • Internal

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.
file String The CDR file.
download_resource_url String The CDR download URL.
Note: The download URL is only valid for 30 minutes.

Examples

Request example

Obtain the download URL of the CDR during 2026/06/04 00:00:00 - 2026/06/04 23: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/download?time_begin=2026/06/04 00:00:00&time_end=2026/06/04 23:59:59&access_token=MDl5yGy9Bq2Jk2BB5ew8ycNk7dHnmhXF HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "file": "P550-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf",
    "download_resource_url": "/api/download/PBX-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf"
}

Download the CDR file

After obtaining the download URL for the CDR file, combine it with the {base_url} and append the {access_token} parameter. Then, use the complete link to download the desired file.

Download link format

{base_url}/{download_resource_url}?access_token={access_token}

Download link example

https://192.168.5.150:8088/api/download/P550-Cdr-37.23.0.109-download-20260610193341-35U4OSyeWE6Gqtdg.pdf?access_token=5tQstKGzg0Lt4MGTETC1eDjlzk97IIny