List calls
const url = 'https://api.siprtc.io/v1/Accounts/AC000000000000000000/Calls?from_date=2026-11-01&to_date=2026-11-26&status=completed&direction=inbound&from=15550100123&to=15550100456';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?from_date=2026-11-01&to_date=2026-11-26&status=completed&direction=inbound&from=15550100123&to=15550100456' \ --header 'Authorization: Basic <credentials>'Lists call detail records (CDRs) of the account, newest first: one record per call leg, written when the leg ends (legs still up are reported as in-progress). Without both from_date and to_date the list covers only the last 24 hours; with both it covers from_date 00:00:00 to to_date 23:59:59 UTC. Paging is one-based: page (or Page) defaults to 1 and limit (or PageSize) defaults to 10, at most 100. With ParentCallSid the list is the legs of that call: page and limit are ignored and up to 50 legs are returned, still within the date window. When nothing matches, the answer is 404 “cdr not found”, not an empty list. The account may be your own or an account under it (a sub-account or a customer of a reseller); naming another account answers 403.
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
AC000000000000000000Query Parameters
Section titled “ Query Parameters ”First day to include, YYYY-MM-DD (UTC). Needs to_date too, otherwise the last 24 hours are listed
Example
2026-11-01Last day to include, YYYY-MM-DD (UTC). Must not be before from_date
Example
2026-11-26Only calls ending this way: completed (NORMAL_CLEARING), canceled (ORIGINATOR_CANCEL), busy (USER_BUSY or NO_USER_RESPONSE), in-progress (not ended), failed (temporary, unspecified or permanent failure, or media timeout / lost race with no billed time). ringing currently matches the same calls as busy; other values are ignored
Only calls in this direction as recorded on the call leg; ANY or ALL disables the filter
Only calls of this type as stored on the leg, e.g. Number (PSTN) or Sip; ANY or ALL disables the filter
Only calls whose caller matches, as a case-insensitive regular expression on the SIP From user (substring match). Leave out a leading +, which is not a valid pattern on its own
Example
15550100123Only calls whose callee matches, as a case-insensitive regular expression on the SIP To user (substring match). Leave out a leading +
Example
15550100456Only calls where the caller or the callee matches this case-insensitive regular expression
Only calls billed at least this many seconds. Applied only together with maxduration
Only calls billed at most this many seconds. Applied only together with minduration
List the legs of this parent call (call SID). parent_call_uuid is accepted too
One-based page number. Page is accepted too. Default 1
Records per page, at most 100 (larger values are capped). PageSize is accepted too. Default 10
Deprecated: must be empty or the account in the path
Responses
Section titled “ Responses ”OK
object
The call records on this page, newest first.
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.
Zero-based index of the last record on this page.
Relative URI of the first page.
Relative URI of the next page; empty on the last page.
One-based number of this page.
Records per page.
Relative URI of the previous page (the first page when on page 1).
Zero-based index of the first record on this page.
Number of records matching the filters, as a string.
Relative URI of this page.
Example
{ "calls": [ { "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" } ], "end": 9, "first_page_uri": "/v1/Accounts/AC000000000000000000/Calls?PageSize=10&Page=1", "next_page_uri": "/v1/Accounts/AC000000000000000000/Calls?PageSize=10&Page=2", "page": 1, "page_size": 10, "previous_page_uri": "/v1/Accounts/AC000000000000000000/Calls?PageSize=10&Page=1", "start": 0, "total_count": "57", "uri": "/v1/Accounts/AC000000000000000000/Calls?PageSize=10&Page=1"}Page or limit not an integer, or customerId 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 call matches (message "cdr not found"); also when from_date is after to_date (or to_date is missing), with the body {"error": "…"}
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"}