Download a Call Report

Download a specific call report.

Steps to download a call report

Request URL

GET {base_url}/{api_path}/call_report/download?access_token={access_token}
Note: To enhance system performance, Yeastar has upgraded the CDR module in version 84.21.0.117 with a new data structure for clearer display and more comprehensive call details. The system gradually deletes old CDRs and related call report data according to the CDR Auto Cleanup setting.

Before old call report data are cleaned up, new and historical data are managed separately - openapi/v2.0 for new data and openapi/v1.0 for historical data. Make sure to use the appropriate API path based on the type of data that you want to retrieve.

Request parameters

Parameter Available Required Type Description
type

This parameter is available in default reports.

Yes String Call report type.
Valid value:
  • extcallstatistics: Extension Call Statistics report.
  • extcallactivity: Extension Call Activity report.
  • trunkactivity: PBX Call Activity report.
  • trunkdiddodactivity: DID/Outbound Caller ID Activity report.
  • ivr: IVR Report.
  • aisttusage: Transcription Usage Details report.
  • aireceptionistcallactivity: AI Receptionist Call Activity report.
    Note: This report is only available in API version 2.0.
  • unreturnmisscall: Unreturned Missed Call Report.
  • queueavgwaittalktime: Queue AVG Waiting & Talking Time report.
  • queueperformance: Queue Performance report.
  • queueperformanceactivity: Queue Performance Activity report.
  • queuecallbackssummary: Queue Callback Summary report.
  • queuecallbacksactivity: Queue Callback Activity report.
  • queuesatisfaction: Satisfaction Survey report.
  • queuesatisfactiondetail: Queue Satisfaction Survey Details report.
  • queueagentlogintime: Agent Login Activity report.
  • queueagentpausetime: Agent Pause Activity report.
  • queueagentmisscalls: Agent Missed Call Activity report.
  • queueagentperformance: Agent Performance report.
  • queueagentinoutcalls: Agent Call Summary report.
  • ringgroupstatistics: Ring Group Statistics report.
  • extcallbilling: Extension Call Accounting report.
  • extcallbillingdetails: Extension Call Accounting Details report.
my_report_id

This parameter is available in user-created reports.

Yes Integer

The ID of a user-created report.

Note: You can query report ID using Query My Reports List.
start_time This parameter is available when querying the following types of reports.
  • Extension Call Statistics
  • IVR Report
  • Transcription Usage Details
  • Unreturned Missed Call Report
  • Queue Performance
  • Queue Callback Summary
  • Queue Callback Activity
  • Satisfaction Survey
  • Satisfaction Survey Details
  • Agent Login Activity
  • Agent Pause Activity
  • Agent Missed Call Activity
  • Agent Performance
  • Agent Call Summary
  • Ring Group Statistics
  • Extension Call Accounting
  • Extension Call Accounting Details
  • Inbound Queue Activity Analysis
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
  • Agent Activity Analysis
No String Specify the start time to filter the reports.
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 This parameter is available when querying the following types of reports.
  • Extension Call Statistics
  • IVR Report
  • Transcription Usage Details
  • Unreturned Missed Call Report
  • Queue Performance
  • Queue Callback Summary
  • Queue Callback Activity
  • Satisfaction Survey
  • Satisfaction Survey Details
  • Agent Login Activity
  • Agent Pause Activity
  • Agent Missed Call Activity
  • Agent Performance
  • Agent Call Summary
  • Ring Group Statistics
  • Extension Call Accounting
  • Extension Call Accounting Details
  • Inbound Queue Activity Analysis
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
  • Agent Activity Analysis
No String Specify the end time to filter the reports.
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.
time This parameter is available when querying the following types of reports:
  • Extension Call Activity
  • PBX Call Activity
  • DID/Outbound Caller ID Activity
  • AI Receptionist Call Activity
  • Queue AVG Waiting & Talking Time
  • Queue Performance Activity
  • Inbound Queue Activity Analysis
  • Agent Activity Analysis
Yes String

Specify the time frame to filter the call report.

Note: The time format depends on the date display format of PBX.

For example, Date Display Format of PBX is Year/Month/Day, then the valid time format is YYYY/MM/DD.

Time format:
  • To query the reports by hour, enter YYYY/MM/DD.
  • To query the reports by day, enter YYYY/MM.
  • To query the reports by month, enter YYYY.
ring_duration_range This parameter is available when querying Inbound Queue Activity Analysis report. This parameter is available when querying Inbound Queue Activity Analysis report. String Specify the time interval used to group the amount of time that callers waited in the queue before connecting to an agent.

Valid value:

  • per_30s
  • per_60s
  • per_5m
  • per_10m
ext_id_list This parameter is available when querying the following types of reports:
  • Extension Call Statistics
  • Extension Call Activity
  • Extension Call Accounting
  • Extension Call Accounting Details
This parameter is required when querying the following types of reports:
  • Extension Call Statistics
  • Extension Call Activity
String The ID(s) of the desired extension(s)/extension group(s).
Note:
  • You can query the extension/extension group's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
trunk_id This parameter is available when querying DID/Outbound Caller ID Activity report. Yes String The ID of the desired trunk.
Note: You can query the trunk's ID using Get Menu Options.
trunk_id_list This parameter is available when querying the following types of reports:
  • PBX Call Activity
  • Extension Call Accounting
  • Extension Call Accounting Details
Yes String The ID(s) of the desired trunk(s).
Note:
  • You can query the trunk's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
ivr_id_list This parameter is available when querying IVR Report. Yes String The ID(s) of the desired IVR(s).
Note:
  • You can query the IVR's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
ring_group_id_list This parameter is available when querying Ring Group Statistics report. Yes String The ID(s) of the desired ring group(s).
Note:
  • You can query the ring group's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
queue_id This parameter is available when querying the following types of reports:
  • Satisfaction Survey
  • Satisfaction Survey Details
  • Agent Login Activity
  • Agent Pause Activity
  • Agent Missed Call Activity
  • Agent Performance
  • Agent Call Summary
Yes String The ID of the desired queue.
Note: You can query the queue's ID using Get Menu Options.
queue_id_list This parameter is available when querying the following types of reports:
  • Queue AVG Waiting & Talking Time
  • Queue Performance
  • Queue Performance Activity
  • Queue Callback Summary
  • Queue Callback Activity
  • Inbound Queue Activity Analysis
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
  • Agent Activity Analysis
Yes String The ID(s) of the desired queue(s).
Note:
  • You can query the queue's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
agent_id_list This parameter is available when querying the following types of reports:
  • Satisfaction Survey Details
  • Agent Login Activity
  • Agent Pause Activity
  • Agent Missed Call Activity
  • Agent Performance
  • Agent Call Summary
  • Inbound Queue Logs for Agent
  • Agent Activity Analysis
No String The ID(s) of the desired agent(s).
Note:
  • You can query the agent's ID using Get Menu Options.
  • Use a comma to separate multiple IDs.
abandon_time This parameter is available when querying the following types of reports:
  • Unreturned Missed Call Report
  • Queue Performance
  • Queue Performance Activity
  • Agent Missed Call Activity
  • Agent Performance
  • Inbound Queue Activity Analysis
  • Agent Activity Analysis
No String Set a time. Calls abandoned within the specified time will not be included in report. (Unit: Second)
talk_time This parameter is available when querying the following types of reports:
  • Queue Performance
  • Inbound Queue Activity Analysis
  • Inbound Queue Logs
  • Agent Activity Analysis
No Integer Set a time. Calls that proceeded within the specified time will be not be included in report. (Unit: Second)
include_internal This parameter is available when querying PBX Call Activity report. No Integer Whether to include internal calls in the report.
Valid value:
  • 0: Exclude the internal calls.
  • 1: Include the internal calls.
callback_result This parameter is available when querying Queue Callback Activity report. No String Queue callback result.

Valid value:

  • success
  • fail
reason This parameter is available when querying Agent Pause Activity report. No String The reason why an agent switched status to pause.

Valid value: The pause reasons set on PBX web portal (Path: Call Features > Queue > Pause Reason).

communication_type This parameter is available when querying the following types of reports:
  • Extension Call Statistics
  • Extension Call Activity
  • PBX Call Activity
  • DID/Outbound Caller ID Activity
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String Communication type.
Note: If this parameter is omitted, the system will query all the communication types.
Valid value for extension related reports:
  • Inbound
  • Outbound
  • Internal
  • InOutbound (for Extension Call Statistics report only)
Valid value for trunk related reports:
  • Inbound
  • Outbound
call_from
This parameter is available when querying the following types of reports:
  • Unreturned Missed Call Report
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String The number of the caller.
call_to This parameter is available when querying the Unreturned Missed Call Report. No String The number of the callee.
call_to_type This parameter is available when querying the Unreturned Missed Call Report. No String The type of the destination to which the call is routed.
Valid value:
  • Extension
  • Queue
  • RingGroup
miss_call_type This parameter is available when querying the Unreturned Missed Call Report. No String

The type of a missed call.

Valid value:
  • no_answer
  • busy
  • abandoned
unreturn_status This parameter is available when querying the Unreturned Missed Call Report. No Integer The return status of a missed call.
Valid value:
  • 1: Returned.
  • 2: Not returned.
ai_receptionist_id_list This parameter is available when querying the AI Receptionist Call Activity report. No String The ID(s) of the AI receptionist(s).
Note:
  • You can query the ID using Get Menu Options (menu=ai_receptionist).
  • Use commas to separate multiple IDs.
status This parameter is available when querying the following types of reports:
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String The status of a queue call.
Valid value:
  • ANSWERED
  • NO ANSWER
  • ABANDONED
agent_speed_to_answer This parameter is available when querying the Inbound Queue Logs report. No String The amount of time agents took to answer queue calls. (Unit: Second)
talk_time_range This parameter is available when querying the following types of reports:
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String The amount of time that agents spent talking to callers, including hold time. (Unit: Second)
pure_talk_time This parameter is available when querying the following types of reports:
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String The amount of time that agents spent talking to callers, excluding hold time. (Unit: Second)
hold_time This parameter is available when querying the following types of reports:
  • Inbound Queue Logs
  • Inbound Queue Logs for Agent
No String The amount of time that agents held queue calls. (Unit: Second)
agent_last_status This parameter is available when querying the Inbound Queue Logs for Agent report. No String The last call status of agents.
Valid value:
  • answered
  • abandoned
  • busy
  • no_answer
process_result This parameter is available when querying the Inbound Queue Logs for Agent report. No String The process result for an abandoned or a missed queue call.
Valid value:
  • unprocessed
  • processing
  • processed
waiting_time_in_queue This parameter is available when querying the Inbound Queue Logs for Agent report. No String The amount of time callers waited in the queue before connecting to an agent or leavin. (Unit: Second)
waiting_time_in_agent This parameter is available when querying the Inbound Queue Logs for Agent report. No String The amount of time it took for agents to answer queue calls. (Unit: Second)
did_num_list This parameter is available when querying the DID/Outbound Caller ID Activity report. No String The DID number that caller dialed.
Note: Use commas to separate multiple DID numbers.
dod_num_list This parameter is available when querying the DID/Outbound Caller ID Activity report. No String The DOD number that caller dialed.
Note: Use commas to separate multiple DOD numbers.
pin_list This parameter is available when querying the Extension Call Accounting Details report. No String The PIN code used when making a call via a restricted outbound route.
Note: Use commas to separate multiple PIN codes.
need_detail This parameter is available when querying the following types of reports:
  • IVR Report
  • Queue Performance
  • Queue Performance Activity
  • Agent Performance
  • Unreturned Missed Call Report
  • AI Receptionist Call Activity
No Integer Whether to include details about the associated calls.
Valid value:
  • 0: Exclude the call details.
  • 1: Include the call details.
detail_type This parameter is available in all call report types. No String How to display details about the associated calls.
Valid value:
  • same_list: Download report data as indented, offset rows within the same list.
  • diff_list: Download report data as multiple files/sheets.
format This parameter is available in all call report types. No String The download format.
Valid value:
  • csv
  • xls
  • pdf
  • html
duration_format This parameter is available in all call report types. No String The display format for all duration-related fields.

Valid value:

  • seconds
  • hhmmss
is_async This parameter is available in all call report types. No Integer

Whether to retrieve data and obtain the download URL of call report asynchronously.

Valid value:
  • 0: Synchronously.
  • 1: Asynchronously.
    Note: When data is retrieved and the download URL of call report is generated, the PBX will send event report 30027 to the third-party application.

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.
  • If you choose to retrieve data asynchronously, error code 2 and error message PROCESSING will be returned. When data is retrieved and the download URL of call report is generated, the PBX will send event report 30027 to the third-party application.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
file String The call report file.
download_resource_url String The call report download URL.
Note: The download URL is only valid for 30 minutes.

Examples

Request example

Obtain the download URL of the IVR report (IVR ID: "1") during 2025/12/01 00:00:00 - 2025/12/31 23:59:59.

Important:
  • If you want to filter call reports 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 records.
  • Make sure to use the appropriate API path based on the type of report data that you want to retrieve.
    • For new report data generated on version 84.21.0.117 or later, use openapi/v2.0.
    • For legacy report data generated on version 84.21.0.66 or earlier, use openapi/v1.0.
GET openapi/v2.0/call_report/download?access_token=5qcixSatPqNQfjsepgFdUsQBID1ZWnu8&type=ivr&start_time=2025/12/01 00:00:00&end_time=2025/12/31 23:59:59&ivr_id_list=1&need_detail=1&is_async=0&detail_type=same_list&format=pdf&duration_format=seconds HTTP/1.1  

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "file": "QueueSatisfaction-X.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv",
    "download_resource_url": "/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv"
}

Download the call report

After obtaining the download URL for the call report, combine it with the {base_url} and append the {access_token} parameter. Then, use the complete link to download the call reports.

Download link format

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

Download link example

https://yeastardocs.example.yeastarcloud.com/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv?access_token=MB1OklPar5hnDfhi4srZa8FrZ4znFSzr