English
English
Appearance
English
English
Appearance
Query CDRs with multiple filters and download recordings via signed URLs.
/api/pbx/cdr — List | Field | Type | Required | Description | Valid values |
|---|---|---|---|---|
from | date | optional | Start date (YYYY-MM-DD) | If omitted → now() - 30 days |
to | date | optional | End date (YYYY-MM-DD) | Must be ≥ from. If omitted → now() |
direction | string | optional | Call direction | inbound, outbound, internal, local |
extension | string | optional | Filter by extension (matches extension_number or agent_extension) | 3-20 chars |
phone | string | optional | Filter by phone number (matches caller_number or destination_number) | max 50 chars |
page | integer | optional | Page number | ≥ 1 |
per_page | integer | optional | Records per page | 1-200 (default 50) |
Time-window limit
The from..to window is capped at 30 days (configurable per account through per-customer configuration limits). Exceeding returns HTTP 422.
data[]) | Field | Type | Description | Valid values |
|---|---|---|---|
uuid | string | Call UUID (Zorio PBX call_uuid) | 36-char UUID |
direction | string | Call direction | inbound / outbound / internal / local |
source_type | string | Call source | inbound / outbound_manual / outbound_telesales / outbound_callback / outbound_webphone / internal |
caller_number | string | Originating number (caller ID) | |
destination_number | string | Destination number | |
extension_number | string|null | Associated extension (caller or destination) | |
agent_extension | string|null | Agent extension that answered (for queue/IVR calls) | |
start_time | datetime | When the call started | ISO 8601 |
answer_time | datetime|null | When the call was answered | ISO 8601 (null if never answered) |
end_time | datetime | When the call ended | ISO 8601 |
duration | integer | Total duration (seconds) | ≥ 0 |
billsec | integer | Billable time (after pickup, seconds) | ≥ 0 |
queue_name | string|null | Queue name (if the call went through a queue) | |
queue_wait_time | integer|null | Time waited in queue (seconds) | |
trunk_name | string|null | Outbound trunk name (for outbound calls) | |
transfer_count | integer | Number of transfers | ≥ 0 |
result | string | Call outcome | answered / busy / no_answer / failed / cancelled / rejected / voicemail |
hangup_cause | string | Hangup code from Zorio PBX | e.g. NORMAL_CLEARING, NO_ANSWER, USER_BUSY, CALL_REJECTED, ... |
sip_response_code | string|null | Final SIP response code (for outbound) | e.g. 200, 486, 487 |
recording_available | bool | Whether a recording exists | true / false |
created_at | datetime | CDR row creation timestamp |
{
"current_page": 1,
"data": [
{
"uuid": "65569ce0-0183-4f61-a3b2-0e433cfa4031",
"direction": "outbound",
"source_type": "outbound_telesales",
"caller_number": "0900000021",
"destination_number": "0987654321",
"extension_number": "0900000021",
"agent_extension": null,
"start_time": "2026-06-27T08:15:42+00:00",
"answer_time": "2026-06-27T08:15:42+00:00",
"end_time": "2026-06-27T08:15:56+00:00",
"duration": 14,
"billsec": 14,
"queue_name": null,
"queue_wait_time": null,
"trunk_name": null,
"transfer_count": 0,
"result": "answered",
"hangup_cause": "NORMAL_CLEARING",
"sip_response_code": null,
"recording_available": true,
"created_at": "2026-06-27 08:15:56"
}
],
"last_page": 5,
"per_page": 20,
"total": 87
}/api/pbx/cdr/{uuid} — Detail + signed recording URL uuid (string, Zorio PBX call_uuid).
Response = the 22 fields from the list + a recording object (if a recording exists).
recording object fields | Field | Type | Description |
|---|---|---|
duration | integer | Recording length (seconds) |
file_size | integer | File size (bytes) |
recorded_at | datetime | When recording started (ISO 8601) |
url | string | HMAC-signed URL to download the .wav — valid only within expires_in_seconds |
expires_in_seconds | integer | URL TTL (default 1800 = 30 minutes) |
{
"data": {
"uuid": "65569ce0-...",
"direction": "outbound",
"recording_available": true,
"recording": {
"duration": 14,
"file_size": 56265,
"recorded_at": "2026-06-27T08:15:57+00:00",
"url": "https://app.zorio.vn/api/public/recordings/401/audio?expires=1782706011&signature=de93e86...",
"expires_in_seconds": 1800
}
}
}/api/pbx/cdr/{uuid}/recording — 302 redirect to signed URL uuid (CDR Unique-ID).
HTTP 302 with header Location: <signed URL>. The client follows the redirect to download the .wav file. Signed URL TTL: 30 minutes (HMAC SHA256).