Skip to main content
GET
Get call SIP ladder
Returns the Session Initiation Protocol (SIP) messages recorded for a call, grouped into legs (carrier to PolyAI’s SIP edge, SIP edge to media server, and any transfer legs) and ordered by capture time. Use it to see why a call failed, how long it rang, who hung up and how a REFER transfer went. With include_sip_details, each message also carries the cause codes from Reason headers and the result of a transfer. For packet loss and jitter on the audio, use get call audio quality. See the overview for how legs, personal data and the time window work.

Request

Headers

string
required
Account API key with read access to conversations.

Path parameters

string
required
The call SID.

Query parameters

string
The agent the call belongs to. Optional with an account API key; required with a PAT. A call that belongs to a different agent returns 404.
datetime
Start of the window in which the call is looked up, ISO 8601. Defaults to 14 days ago, the retention limit.
datetime
End of the window, ISO 8601. Defaults to now.
boolean
default:"false"
Add selected details from each SIP message: reason_headers and refer_status for any key, and, when the key can read personal data (PII), sdp, refer_to, referred_by, asserted_identity and diversions.

Response

string
string
string
null when you did not pass project_id.
datetime
Capture time of the first message, UTC.
datetime
Capture time of the last message, UTC.
object[]
One entry per SIP dialog, ordered by first_ts.
object[]
The messages of all legs, ordered by capture time.
integer
Number of messages returned. When truncated is true this is the cap, not the call’s real total.
boolean
true when the cap of 2,000 messages was reached and later messages are missing.

Example

This request uses a key that cannot read PII, so numbers are masked and network details are null.
The response is abridged: legs shows both legs, messages the first two of nine.

With SIP details and PII access

With include_sip_details=true and a key that can read PII, the same call’s INVITE and the carrier’s BYE look like this:

Errors

Last modified on December 4, 2026