Fetch a call
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls/3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls/3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11 \ --header 'Authorization: Basic <credentials>'Returns the call detail record (CDR) of one call leg by its call SID, including the full RTP statistics of the leg (rtp_stats: codec and media addresses, inbound and outbound packet counts, jitter, loss, MOS, error periods) next to the call_quality summary that lists also show. A call of another account answers 404, as does a leg whose CDR has not been written yet (CDRs are written when the leg ends). The account may be your own or an account under it.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Account Auth ID (AC followed by the account id) whose calls to read: your own account, or an account under it
Example
AC000000000000000000Call SID (a UUID), as returned when the call was created or in status callbacks
Example
3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11Query Parameters
Section titled “ Query Parameters ”Deprecated: must be empty or the account in the path
Responses
Section titled “ Responses ”OK
object
Name of the account (list responses; empty when fetching one call). Note the key is CustomerName.
Account the call belongs to.
Not currently populated.
Not currently populated.
API version that produced the record.
RTP quality summary of the audio; omitted when the leg had no media statistics.
object
Audio codec, e.g. PCMU, PCMA, OPUS.
Overall grade from the MOS: excellent, good, fair, poor or bad; one_way or no_media when packets flowed in one direction or none.
Audio packets received from the far end.
Problems found: no_inbound_media, no_outbound_media, packet_loss (over 1%), high_jitter (over 30 ms), low_mos (below 3.6), media_timeout, loss_bursts.
Inbound inter-arrival jitter in milliseconds.
Estimated inbound packet loss in percent (reads high on bursty loss).
Mean opinion score of the received audio, 1 to 4.5.
Audio packets sent to the far end.
R value (0 to 100) the MOS derives from (ITU-T G.107).
Not currently populated.
Carrier cost, on records rated through CDR import; omitted otherwise.
Cost charged to the customer, on records rated through CDR import; omitted otherwise.
Rate charged to the customer, on records rated through CDR import; omitted otherwise.
Not currently populated.
Not currently populated.
Direction of the leg as the media server records it: inbound or outbound.
Billed duration in whole seconds (rounded up to the billing pulse when the call was rated).
When the leg ended, “YYYY-MM-DD hh:mm:ss”; absent while in progress.
Not currently populated.
Calling party (caller ID number or SIP user).
From, URL-decoded.
Not currently populated.
Which side hung up, when known.
SIP hangup disposition, e.g. send_bye, recv_bye, recv_cancel.
Hangup cause, e.g. NORMAL_CLEARING, USER_BUSY, NO_ANSWER, ORIGINATOR_CANCEL.
Call SID of the parent leg, for legs created by
Not currently populated.
Cost of the call in price_unit, as a decimal string; 0 when unrated.
Currency of price.
Billing increment in seconds, on records rated through CDR import; omitted otherwise.
Pulse duration, on records rated through CDR import; omitted otherwise.
Not currently populated.
Rate applied, on records rated through CDR import; omitted otherwise.
Full RTP statistics of the leg; only when fetching one call.
object
Audio stream statistics.
object
Stretches of the call with inbound packet loss (at most 50).
object
Longest run of consecutive flaws in the period.
Length of the period, ms.
Flaws counted in the period.
Start of the period from the beginning of the call, ms.
Start of the period, unix microseconds.
End of the period, unix microseconds (3 s after the last loss).
What the platform received from the far end of this leg.
object
Received RTP bitrate in kbit/s over the billed time.
Comfort noise packets received.
DTMF (telephone-event) packets received.
Lost, late or flushed packets, plus penalties for runs of consecutive loss.
Packets dropped to catch up (jitter buffer flush).
Burst loss rate seen by the jitter buffer.
Loss rate seen by the jitter buffer.
Largest inter-arrival jitter, ms.
Largest variance of the packet inter-arrival time, ms squared.
Smallest inter-arrival jitter, ms.
Smallest variance of the packet inter-arrival time, ms squared.
Packets that went through the jitter buffer.
Largest jitter buffer size reached, in packets.
Estimated packet loss in percent: flaw_total / (media_packet_count + flaw_total).
Mean packet inter-arrival time, ms.
Media payload bytes received.
Media packets received.
Mean opinion score, 1 to 4.5.
Packets received.
R value, 0 to 100.
Bytes received, RTP headers included.
Packets skipped.
What the platform sent to the far end.
object
Sent RTP bitrate in kbit/s over the billed time.
Comfort noise packets sent.
DTMF (telephone-event) packets sent.
Media payload bytes sent.
Media packets sent.
Packets sent.
Bytes sent, RTP headers included.
RTP payload octets announced in RTCP sender reports.
RTP packets this side announced in its RTCP sender reports (not a count of RTCP packets); 0 when the leg sent no RTCP.
Packets skipped.
What was negotiated for the leg (codec, addresses, SRTP).
object
Media IP the platform advertised in SDP.
Audio channels.
Negotiated audio codec.
Codec sample rate, Hz.
How DTMF was carried, e.g. rfc2833.
Jitter buffer setting, ms.
Platform media IP.
Platform media port.
RTP payload type sent.
Packetization time, ms.
Codec read from the far end.
RTP payload type received.
Far end media IP.
Far end media port.
Far end RTCP port.
Whether RTP and RTCP shared a port.
SIP transport of the leg, e.g. udp, tls, wss.
Whether the media was encrypted with SRTP.
SRTP crypto suite, when encrypted.
RTP SSRC of the stream.
Payload type of telephone-event.
Negotiated video codec, when the leg had video.
Codec written to the far end.
Summary of the audio quality, as in call lists.
object
Audio codec, e.g. PCMU, PCMA, OPUS.
Overall grade from the MOS: excellent, good, fair, poor or bad; one_way or no_media when packets flowed in one direction or none.
Audio packets received from the far end.
Problems found: no_inbound_media, no_outbound_media, packet_loss (over 1%), high_jitter (over 30 ms), low_mos (below 3.6), media_timeout, loss_bursts.
Inbound inter-arrival jitter in milliseconds.
Estimated inbound packet loss in percent (reads high on bursty loss).
Mean opinion score of the received audio, 1 to 4.5.
Audio packets sent to the far end.
R value (0 to 100) the MOS derives from (ITU-T G.107).
Version of this statistics format.
Video stream statistics, when the leg had video.
object
Stretches of the call with inbound packet loss (at most 50).
object
Longest run of consecutive flaws in the period.
Length of the period, ms.
Flaws counted in the period.
Start of the period from the beginning of the call, ms.
Start of the period, unix microseconds.
End of the period, unix microseconds (3 s after the last loss).
What the platform received from the far end of this leg.
object
Received RTP bitrate in kbit/s over the billed time.
Comfort noise packets received.
DTMF (telephone-event) packets received.
Lost, late or flushed packets, plus penalties for runs of consecutive loss.
Packets dropped to catch up (jitter buffer flush).
Burst loss rate seen by the jitter buffer.
Loss rate seen by the jitter buffer.
Largest inter-arrival jitter, ms.
Largest variance of the packet inter-arrival time, ms squared.
Smallest inter-arrival jitter, ms.
Smallest variance of the packet inter-arrival time, ms squared.
Packets that went through the jitter buffer.
Largest jitter buffer size reached, in packets.
Estimated packet loss in percent: flaw_total / (media_packet_count + flaw_total).
Mean packet inter-arrival time, ms.
Media payload bytes received.
Media packets received.
Mean opinion score, 1 to 4.5.
Packets received.
R value, 0 to 100.
Bytes received, RTP headers included.
Packets skipped.
What the platform sent to the far end.
object
Sent RTP bitrate in kbit/s over the billed time.
Comfort noise packets sent.
DTMF (telephone-event) packets sent.
Media payload bytes sent.
Media packets sent.
Packets sent.
Bytes sent, RTP headers included.
RTP payload octets announced in RTCP sender reports.
RTP packets this side announced in its RTCP sender reports (not a count of RTCP packets); 0 when the leg sent no RTCP.
Packets skipped.
Call SID of this leg, a UUID.
SIP Call-ID of the leg, when recorded.
When the leg started, “YYYY-MM-DD hh:mm:ss” as the media server records it.
Final status: completed, busy, no-answer, canceled, failed or in-progress.
Related resources.
object
Not currently populated.
Relative URI of the call’s recordings.
Called party: an E.164 number without +, or sip:user@host for SIP calls.
To, URL-decoded.
Not currently populated.
Kind of endpoint: Phone (PSTN number) or Sip (SIP endpoint or trunk).
Relative URI of this call record.
Example
{ "account_sid": "AC000000000000000000", "api_version": "v1", "call_quality": { "codec": "PCMU", "grade": "good", "inbound_packets": 2100, "jitter_ms": 4.1, "loss_pct": 0.3, "mos": 4.2, "outbound_packets": 2098, "r_factor": 86.5 }, "direction": "outbound", "duration": "42", "end_time": "2026-11-26 10:16:12", "from": "15550100123", "from_formatted": "15550100123", "hangup_disposition": "recv_bye", "hangup_reason": "NORMAL_CLEARING", "price": "0.012000", "price_unit": "USD", "rtp_stats": { "media": { "channels": 1, "codec": "PCMU", "codec_rate": 8000, "payload_type": "0", "ptime_ms": 20, "recv_payload_type": "0", "srtp": false }, "quality": { "codec": "PCMU", "grade": "good", "inbound_packets": 2100, "jitter_ms": 4.1, "loss_pct": 0.3, "mos": 4.2, "outbound_packets": 2098, "r_factor": 86.5 }, "version": 1 }, "sid": "3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11", "start_time": "2026-11-26 10:15:30", "status": "completed", "to": "15550100456", "to_formatted": "15550100456", "type": "Phone", "uri": "/v1/Accounts/AC000000000000000000/Calls/3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11"}Auth_id query parameter names another account
object
What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.
Always “failed”.
Example
{ "message": "cdr not found", "status": "failed"}Authentication failed: missing or invalid credentials (JSON string from the API gateway)
Example generated
exampleThe account in the path is neither yours nor under yours
object
What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.
Always “failed”.
Example
{ "message": "cdr not found", "status": "failed"}No CDR for this call in this account (message "cdr not found")
object
What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.
Always “failed”.
Example
{ "message": "cdr not found", "status": "failed"}Account lookup unavailable
object
What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.
Always “failed”.
Example
{ "message": "cdr not found", "status": "failed"}