Skip to content

Fetch a call

GET
/v1/Accounts/{auth_id}/Calls/{call_sid}
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.

auth_id
required
string

Account Auth ID (AC followed by the account id) whose calls to read: your own account, or an account under it

Example

AC000000000000000000
call_sid
required
string

Call SID (a UUID), as returned when the call was created or in status callbacks

Example

3f0c2a9e-6a51-4d55-9a57-0d2f6e0f8a11
auth_id
string

Deprecated: must be empty or the account in the path

OK

Media type application/json
object
CustomerName

Name of the account (list responses; empty when fetching one call). Note the key is CustomerName.

string
account_sid

Account the call belongs to.

string
annotation

Not currently populated.

string
answered_by

Not currently populated.

string
api_version

API version that produced the record.

string
call_quality

RTP quality summary of the audio; omitted when the leg had no media statistics.

object
codec

Audio codec, e.g. PCMU, PCMA, OPUS.

string
grade

Overall grade from the MOS: excellent, good, fair, poor or bad; one_way or no_media when packets flowed in one direction or none.

string
inbound_packets

Audio packets received from the far end.

integer
issues

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.

Array<string>
jitter_ms

Inbound inter-arrival jitter in milliseconds.

number
loss_pct

Estimated inbound packet loss in percent (reads high on bursty loss).

number
mos

Mean opinion score of the received audio, 1 to 4.5.

number
outbound_packets

Audio packets sent to the far end.

integer
r_factor

R value (0 to 100) the MOS derives from (ITU-T G.107).

number
caller_name

Not currently populated.

string
carrier_cost

Carrier cost, on records rated through CDR import; omitted otherwise.

number
customer_cost

Cost charged to the customer, on records rated through CDR import; omitted otherwise.

number
customer_rate

Rate charged to the customer, on records rated through CDR import; omitted otherwise.

number
date_created

Not currently populated.

string
date_updated

Not currently populated.

string
direction

Direction of the leg as the media server records it: inbound or outbound.

string
duration

Billed duration in whole seconds (rounded up to the billing pulse when the call was rated).

string
end_time

When the leg ended, “YYYY-MM-DD hh:mm:ss”; absent while in progress.

string
forwarded_from

Not currently populated.

string
from

Calling party (caller ID number or SIP user).

string
from_formatted

From, URL-decoded.

string
group_sid

Not currently populated.

string
hangup_by

Which side hung up, when known.

string
hangup_disposition

SIP hangup disposition, e.g. send_bye, recv_bye, recv_cancel.

string
hangup_reason

Hangup cause, e.g. NORMAL_CLEARING, USER_BUSY, NO_ANSWER, ORIGINATOR_CANCEL.

string
parent_call_sid

Call SID of the parent leg, for legs created by , transfers or conferences.

string
phone_number_sid

Not currently populated.

string
price

Cost of the call in price_unit, as a decimal string; 0 when unrated.

string
price_unit

Currency of price.

string
pulse

Billing increment in seconds, on records rated through CDR import; omitted otherwise.

number
pulse_duration

Pulse duration, on records rated through CDR import; omitted otherwise.

integer
queue_time

Not currently populated.

string
rate

Rate applied, on records rated through CDR import; omitted otherwise.

number
rtp_stats

Full RTP statistics of the leg; only when fetching one call.

object
audio

Audio stream statistics.

object
error_periods

Stretches of the call with inbound packet loss (at most 50).

Array<object>
object
consecutive_flaws

Longest run of consecutive flaws in the period.

integer
duration_ms

Length of the period, ms.

integer
flaws

Flaws counted in the period.

integer
offset_ms

Start of the period from the beginning of the call, ms.

integer
start

Start of the period, unix microseconds.

integer
stop

End of the period, unix microseconds (3 s after the last loss).

integer
inbound

What the platform received from the far end of this leg.

object
bitrate_kbps

Received RTP bitrate in kbit/s over the billed time.

number
cng_packet_count

Comfort noise packets received.

integer
dtmf_packet_count

DTMF (telephone-event) packets received.

integer
flaw_total

Lost, late or flushed packets, plus penalties for runs of consecutive loss.

integer
flush_packet_count

Packets dropped to catch up (jitter buffer flush).

integer
jitter_burst_rate

Burst loss rate seen by the jitter buffer.

number
jitter_loss_rate

Loss rate seen by the jitter buffer.

number
jitter_max_ms

Largest inter-arrival jitter, ms.

number
jitter_max_variance

Largest variance of the packet inter-arrival time, ms squared.

number
jitter_min_ms

Smallest inter-arrival jitter, ms.

number
jitter_min_variance

Smallest variance of the packet inter-arrival time, ms squared.

number
jitter_packet_count

Packets that went through the jitter buffer.

integer
largest_jb_size

Largest jitter buffer size reached, in packets.

integer
loss_pct

Estimated packet loss in percent: flaw_total / (media_packet_count + flaw_total).

number
mean_interval_ms

Mean packet inter-arrival time, ms.

number
media_bytes

Media payload bytes received.

integer
media_packet_count

Media packets received.

integer
mos

Mean opinion score, 1 to 4.5.

number
packet_count

Packets received.

integer
quality_percentage

R value, 0 to 100.

number
raw_bytes

Bytes received, RTP headers included.

integer
skip_packet_count

Packets skipped.

integer
outbound

What the platform sent to the far end.

object
bitrate_kbps

Sent RTP bitrate in kbit/s over the billed time.

number
cng_packet_count

Comfort noise packets sent.

integer
dtmf_packet_count

DTMF (telephone-event) packets sent.

integer
media_bytes

Media payload bytes sent.

integer
media_packet_count

Media packets sent.

integer
packet_count

Packets sent.

integer
raw_bytes

Bytes sent, RTP headers included.

integer
rtcp_octet_count

RTP payload octets announced in RTCP sender reports.

integer
rtcp_packet_count

RTP packets this side announced in its RTCP sender reports (not a count of RTCP packets); 0 when the leg sent no RTCP.

integer
skip_packet_count

Packets skipped.

integer
media

What was negotiated for the leg (codec, addresses, SRTP).

object
advertised_ip

Media IP the platform advertised in SDP.

string
channels

Audio channels.

integer
codec

Negotiated audio codec.

string
codec_rate

Codec sample rate, Hz.

integer
dtmf_type

How DTMF was carried, e.g. rfc2833.

string
jitter_buffer_ms

Jitter buffer setting, ms.

string
local_ip

Platform media IP.

string
local_port

Platform media port.

string
payload_type

RTP payload type sent.

string
ptime_ms

Packetization time, ms.

integer
read_codec

Codec read from the far end.

string
recv_payload_type

RTP payload type received.

string
remote_ip

Far end media IP.

string
remote_port

Far end media port.

string
remote_rtcp_port

Far end RTCP port.

string
rtcp_mux

Whether RTP and RTCP shared a port.

boolean
signaling_transport

SIP transport of the leg, e.g. udp, tls, wss.

string
srtp

Whether the media was encrypted with SRTP.

boolean
srtp_crypto_suite

SRTP crypto suite, when encrypted.

string
ssrc

RTP SSRC of the stream.

string
telephone_event_pt

Payload type of telephone-event.

string
video_codec

Negotiated video codec, when the leg had video.

string
write_codec

Codec written to the far end.

string
quality

Summary of the audio quality, as in call lists.

object
codec

Audio codec, e.g. PCMU, PCMA, OPUS.

string
grade

Overall grade from the MOS: excellent, good, fair, poor or bad; one_way or no_media when packets flowed in one direction or none.

string
inbound_packets

Audio packets received from the far end.

integer
issues

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.

Array<string>
jitter_ms

Inbound inter-arrival jitter in milliseconds.

number
loss_pct

Estimated inbound packet loss in percent (reads high on bursty loss).

number
mos

Mean opinion score of the received audio, 1 to 4.5.

number
outbound_packets

Audio packets sent to the far end.

integer
r_factor

R value (0 to 100) the MOS derives from (ITU-T G.107).

number
version

Version of this statistics format.

integer
video

Video stream statistics, when the leg had video.

object
error_periods

Stretches of the call with inbound packet loss (at most 50).

Array<object>
object
consecutive_flaws

Longest run of consecutive flaws in the period.

integer
duration_ms

Length of the period, ms.

integer
flaws

Flaws counted in the period.

integer
offset_ms

Start of the period from the beginning of the call, ms.

integer
start

Start of the period, unix microseconds.

integer
stop

End of the period, unix microseconds (3 s after the last loss).

integer
inbound

What the platform received from the far end of this leg.

object
bitrate_kbps

Received RTP bitrate in kbit/s over the billed time.

number
cng_packet_count

Comfort noise packets received.

integer
dtmf_packet_count

DTMF (telephone-event) packets received.

integer
flaw_total

Lost, late or flushed packets, plus penalties for runs of consecutive loss.

integer
flush_packet_count

Packets dropped to catch up (jitter buffer flush).

integer
jitter_burst_rate

Burst loss rate seen by the jitter buffer.

number
jitter_loss_rate

Loss rate seen by the jitter buffer.

number
jitter_max_ms

Largest inter-arrival jitter, ms.

number
jitter_max_variance

Largest variance of the packet inter-arrival time, ms squared.

number
jitter_min_ms

Smallest inter-arrival jitter, ms.

number
jitter_min_variance

Smallest variance of the packet inter-arrival time, ms squared.

number
jitter_packet_count

Packets that went through the jitter buffer.

integer
largest_jb_size

Largest jitter buffer size reached, in packets.

integer
loss_pct

Estimated packet loss in percent: flaw_total / (media_packet_count + flaw_total).

number
mean_interval_ms

Mean packet inter-arrival time, ms.

number
media_bytes

Media payload bytes received.

integer
media_packet_count

Media packets received.

integer
mos

Mean opinion score, 1 to 4.5.

number
packet_count

Packets received.

integer
quality_percentage

R value, 0 to 100.

number
raw_bytes

Bytes received, RTP headers included.

integer
skip_packet_count

Packets skipped.

integer
outbound

What the platform sent to the far end.

object
bitrate_kbps

Sent RTP bitrate in kbit/s over the billed time.

number
cng_packet_count

Comfort noise packets sent.

integer
dtmf_packet_count

DTMF (telephone-event) packets sent.

integer
media_bytes

Media payload bytes sent.

integer
media_packet_count

Media packets sent.

integer
packet_count

Packets sent.

integer
raw_bytes

Bytes sent, RTP headers included.

integer
rtcp_octet_count

RTP payload octets announced in RTCP sender reports.

integer
rtcp_packet_count

RTP packets this side announced in its RTCP sender reports (not a count of RTCP packets); 0 when the leg sent no RTCP.

integer
skip_packet_count

Packets skipped.

integer
sid

Call SID of this leg, a UUID.

string
sip_call_id

SIP Call-ID of the leg, when recorded.

string
start_time

When the leg started, “YYYY-MM-DD hh:mm:ss” as the media server records it.

string
status

Final status: completed, busy, no-answer, canceled, failed or in-progress.

string
subresource_uris

Related resources.

object
notifications

Not currently populated.

string
recordings

Relative URI of the call’s recordings.

string
to

Called party: an E.164 number without +, or sip:user@host for SIP calls.

string
to_formatted

To, URL-decoded.

string
trunk_sid

Not currently populated.

string
type

Kind of endpoint: Phone (PSTN number) or Sip (SIP endpoint or trunk).

string
uri

Relative URI of this call record.

string

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

Media type application/json
object
message

What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.

string
status

Always “failed”.

string

Example

{
"message": "cdr not found",
"status": "failed"
}

Authentication failed: missing or invalid credentials (JSON string from the API gateway)

Media type application/json
string

Example generated

example

The account in the path is neither yours nor under yours

Media type application/json
object
message

What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.

string
status

Always “failed”.

string

Example

{
"message": "cdr not found",
"status": "failed"
}

No CDR for this call in this account (message "cdr not found")

Media type application/json
object
message

What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.

string
status

Always “failed”.

string

Example

{
"message": "cdr not found",
"status": "failed"
}

Account lookup unavailable

Media type application/json
object
message

What went wrong, e.g. “cdr not found”, “limit should be vaild integer”.

string
status

Always “failed”.

string

Example

{
"message": "cdr not found",
"status": "failed"
}