API Endpoint
The Call Object
Attributes
Unique call identifier.
Caller ID.
Destination number.
Direction. Values:
inbound, outbound.Actual call duration in seconds.
Billed duration in seconds.
Billed duration (may differ based on billing interval).
When call was initiated (UTC).
When call was answered (UTC).
When call ended (UTC).
Reason for hangup.
Numeric hangup cause code.
Who ended the call. Values:
customer, carrier, zentrunk.Per-minute rate (USD).
Total cost (USD).
Trunk domain used.
Caller’s country (ISO2).
Destination country (ISO2).
Protocol used (e.g.,
udp, tcp).Whether SRTP encryption was used.
Whether secure trunking was enabled.
Secure trunking per-minute rate.
STIR/SHAKEN status.
Attestation level. Values:
A, B, C.Example Response
Retrieve a Call
Get the call detail record (CDR) for a specific call.cURL
Response
Returns the Call object for the specified call UUID.List All Calls
Retrieve CDRs for all calls with optional filtering.Query Parameters
Filter by caller ID (exact or prefix).
Filter by destination (exact or prefix).
Filter by direction. Values:
inbound, outbound.Filter by hangup cause code.
Filter by hangup source. Values:
customer, carrier, zentrunk.Filter by STIR status. Values:
Verified, Not Verified, Not Applicable.Filter by duration in seconds. Supports variants:
bill_duration__gt, bill_duration__gte, bill_duration__lt, bill_duration__lte.Filter by call end time. Format:
YYYY-MM-DD HH:MM[:ss] (UTC). Supports variants: end_time__gt, end_time__gte, end_time__lt, end_time__lte.Results per page. Max: 20. Default: 20.
Pagination offset. Default: 0.
You can retrieve only calls from the last 90 days. Without an
end_time filter, the API searches the last 30 days.Example Request
cURL
Response
Retrieve Call Insights
Get quality metrics for a specific call.cURL
Response
Insights Metrics
Round-trip time in milliseconds. High values indicate network latency.
Variance in packet delay (ms). Causes robotic-sounding audio.
Percentage of lost packets. Causes broken audio.
Time from call initiation to ringing (ms).
Quality rating from 1-5. Higher is better.
Quality Score Guidelines
| Score | Quality |
|---|---|
4.0 - 5.0 | Excellent |
3.0 - 4.0 | Good |
2.0 - 3.0 | Fair |
1.0 - 2.0 | Poor |
STIR/SHAKEN Verification
Thestir_verification field indicates call authenticity:
| Value | Description |
|---|---|
Verified | Caller verified with attestation level A |
Not Verified | Attestation level B or C |
Not Applicable | Non-US calls or cloud calls (WebRTC/SIP) |
Hangup Sources
| Source | Description |
|---|---|
customer | Your infrastructure ended the call |
carrier | The terminating carrier ended the call |
zentrunk | Plivo’s SIP trunking platform ended the call |
Related
- Trunks - Manage SIP trunks
- Hangup Codes - Complete hangup cause reference