Export CDRs as CSV
cdr_export_csvGenerate a CSV file of call detail records for a date range and return a temporary download URL. Use for file exports; for browsing or analysis, use detail and statistics tools.
Instructions
Start an asynchronous CSV export of call detail records for a date range and wait for the download link. The export runs server-side (capped at 500,000 rows; a capped file ends with a TRUNCATED marker line) and the tool returns a signed download URL valid 24h — it never returns CSV text, so hand the URL to the user rather than trying to read it. Use only when the user explicitly wants a file; for browsing or analysis use cdr_get_details / cdr_get_statistics. This tool polls for up to 45s; if the job is still running it returns its job_id — call the tool again with that job_id (filters are ignored then) to resume waiting on the same export instead of starting a new one. Errors: INVALID_DATE, NO_ACTIVE_CUSTOMER, NOT_FOUND (unknown or foreign job_id), CDR_EXPORT_FAILED, EXPORT_TIMEOUT, CDR_EXPORT_UNAVAILABLE.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ani | No | Filter by ANI (calling number) | |
| dni | No | Filter by DNI (called number) | |
| job_id | No | Resume polling an export job returned by an earlier call instead of starting a new one. When set, the filter parameters are ignored. | |
| end_date | No | End date (YYYY-MM-DD, inclusive) | |
| direction | No | Filter by call direction | |
| start_date | No | Start date (YYYY-MM-DD) | |
| disposition | No | Filter by call disposition (e.g. ANSWERED, NO ANSWER, BUSY, FAILED) | |
| tz_offset_minutes | No | Operator timezone offset in minutes, as returned by JS getTimezoneOffset() (e.g. 420 for US Mountain in summer) |