Call Records

Call Records

Search, export, and analyse call detail records (CDRs).

Every finished call produces a call detail record (CDR): timing, outcome, cost, carrier, and media quality. CDRs are kept beyond the 24-hour window of List Calls, so use them for history, reporting, and debugging.

All endpoints are GET requests under https://api.tryvox.io/v1/account/{auth_id}/cdr.

PathPurpose
/cdrList CDRs
/cdr/searchSearch CDRs (same filters)
/cdr/{uuid}One CDR
/cdr/recent?limit=20The most recent CDRs
/cdr/exportCSV export
/cdr/export/pdfPrintable report
/cdr/statsTotals
/cdr/daily?days=7Daily totals
/cdr/failures?limit=8Failure causes
/cdr/application-statsPer-application totals
/cdr/number-health?e164=…&days=30One number's call health
curl "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/cdr?call_direction=outbound&start_date=2026-10-01T00:00:00Z&per_page=50" \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN

Filters

ParameterDescription
from_numberCaller number
to_numberCalled number
call_directioninbound or outbound
hangup_causee.g. NORMAL_CLEARING, USER_BUSY, NO_ANSWER
sip_call_idSIP Call-ID
searchFree-text search
start_date, end_dateRFC 3339 timestamps. An end_date before start_date is rejected; an unparseable date is ignored.
min_duration, max_durationDuration bounds in seconds
page, per_pageDefault 1 and 20; per_page max 100

The same filters apply to /cdr/search and /cdr/export.

Response

data is an array of CDRs with meta (page, per_page, total). A CDR (fields omitted when empty):

{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "account_id": "TJab12cd34",
  "caller_id_number": "+918045671234",
  "destination_number": "+919812345678",
  "call_direction": "outbound",
  "start_time": "2026-10-30T10:35:00Z",
  "answer_time": "2026-10-30T10:35:06Z",
  "end_time": "2026-10-30T10:37:10Z",
  "duration": 130,
  "billsec": 124,
  "ring_time": 6,
  "hangup_cause": "NORMAL_CLEARING",
  "codec": "PCMU",
  "mos": 4.3,
  "jitter": 2.1,
  "packet_loss": 0,
  "cost": 1.24,
  "currency": "INR",
  "recording_id": "0e4b2c1a-7f3d-4a9e-8b6c-5d2e1f0a9b8c",
  "created_at": "2026-10-30T10:37:11Z"
}
FieldDescription
uuidCall UUID — the request_uuid of an API call
caller_id_number, caller_id_name, destination_numberCall parties
call_directioninbound or outbound
start_time, answer_time, end_timeTimestamps
duration, billsec, ring_timeSeconds total, billed, and ringing
hangup_cause, hangup_dispositionHow the call ended
failure_code, failure_reasonSIP failure detail for calls that didn't connect
customer_endpoint, sip_call_idSignalling detail
codec, mos, jitter (ms), packet_lossMedia quality
cost, currencyWhat the call cost
recording_id, recording_urlThe call's recording, if any
transcript_text, transcript_statusThe call's transcript, if any

Get One CDR

GET /v1/account/{auth_id}/cdr/{uuid}

Returns {"data": {"cdr": <cdr>, "stream_cdrs": [...]}}: the CDR, plus the call's media stream records. recording_url here is a path relative to https://api.tryvox.io and needs your credentials.

Export

  • GET /cdr/export streams a CSV file (Content-Disposition: attachment) of the CDRs matching the filters.
  • GET /cdr/export/pdf returns a print-ready HTML report (Content-Type: text/html) of the same data. Open it in a browser and print to PDF.

Stats

GET /cdr/stats — totals over an optional start_date/end_date (RFC 3339) window:

{
  "data": {
    "total_calls": 412,
    "answered_calls": 351,
    "failed_calls": 61,
    "total_duration": 40210,
    "total_billsec": 37122,
    "avg_duration": 97.6,
    "total_cost": 618.7,
    "sip_trunk_calls": 120,
    "voice_api_calls": 292
  }
}

Daily

GET /cdr/daily?days=7 — one entry per day (days from 1 to 90, default 7) with date, total_calls, answered_calls, inbound_calls, outbound_calls, total_billsec, total_cost, sip_trunk_calls, and voice_api_calls. Also accepts start_date/end_date.

Failures

GET /cdr/failures — total_calls, failed_calls, and the top failure causes (cause, count, percentage) over the same window as stats. limit defaults to 8, max 20.

Per Application

GET /cdr/application-stats — per voice application: application_id, calls, answered, failed, total_billsec, avg_billsec, cost, last_call_at.

Number Health

GET /cdr/number-health?e164=+918045671234&days=30 — one number's total_calls, answered_calls, failed_calls, answer_rate, avg_duration, total_billsec, inbound_calls, outbound_calls, last_call_at, and a daily breakdown. e164 is required (8–15 digits, optional +); days defaults to 30.

On this page