Get a call
GET
/v1/voice/calls/{call_id}
bird voice get <call-id>curl -X GET "https://us1.platform.bird.com/v1/voice/calls/{call_id}" \
-H "Authorization: Bearer $TOKEN"const call = await bird.voice.get("vcl_01k0p3v9wera3v6q6xw3e9y2mh");
// A call still ringing or connected carries no economics yet.
call.status; // "answered" | "no_answer" | "ringing" | …call = client.voice.get("vcl_01k0p3v9wera3v6q6xw3e9y2mh")
# A call still ringing or connected carries no economics yet.
print(call.status, call.duration_ms, call.cost)call, err := client.Voice.Get(context.Background(), "vcl_01k0p3v9wera3v6q6xw3e9y2mh")
if err != nil {
log.Fatal(err)
}
// A call still ringing or connected carries no economics yet.
fmt.Println(call.Status, call.DurationMs)$call = $bird->voice->get('vcl_01k0p3v9wera3v6q6xw3e9y2mh');
// A call still ringing or connected carries no economics yet.
echo $call->getStatus(), ' ', $call->getDurationMs() ?? 'in flight';Returns a single call at any point in its lifecycle. A call that is still ringing or connected answers with its in-flight status and no economics: duration_ms, billable_ms, ended_at, and cost fill in once it ends, at this same URL. Returns a 404 not_found_error if the call does not exist in the workspace.
Treść odpowiedzi
id
string
wymagane
Unique identifier for this call record.
session_id
nullable string
Session identifier shared across all legs of a multi-party or transferred call. Use this to correlate related call records. Null when session correlation is not available for the call.
workspace_id
string
wymagane
direction
object
wymagane
from
string
wymagane
Calling party number in E.164 format.
to
string
wymagane
Called party number in E.164 format.
sip_trunk_id
nullable string
Identifier of the SIP trunk that originated this call. Null when no trunk is associated.
status
object
wymagane
sip_response_code
nullable integer
Final SIP response code received from the carrier. Null when no SIP response was received, for example on timeout or DNS failure.
rejection_reason
object
Why Bird refused the call before dialing a carrier. Absent when Bird did not refuse it, meaning the call either connected or it failed at the carrier, where sip_response_code is the whole story.
started_at
string
wymagane
When the call was initiated.
answered_at
nullable string
When the call was answered (200 OK received). Null for unanswered calls.
ended_at
nullable string
When the call ended (BYE or final non-2xx response). Null for calls that ended abnormally without a recorded end event.
duration_ms
nullable integer
Total call duration in milliseconds, measured from the first INVITE to the BYE or final response. Null while the call is still in progress and has no final duration yet.
pdd_ms
integer
Post-dial delay in milliseconds: how long the caller heard nothing between dialing and the phone starting to ring at the other end. High values are what callers experience as the call "not going through". Absent when the call never rang, either because it failed first or because the carrier answered it immediately.
billable_ms
nullable integer
Billable duration in milliseconds, measured from answer to call end. Zero for unanswered calls, and null while the call is still in progress.
media_quality
object
How the audio sounded, as opposed to whether the call connected. Absent when the call carried no audio, or when the far end reported nothing to measure from.
Pokaż atrybuty podrzędne
media_quality.mos
number
wymagane
Mean opinion score, the single number for how the call sounded, from 1 (unintelligible) to 5 (as good as being in the same room). Anything at or above 4.0 is what most people would call a clear line, and below 3.5 is where callers start asking each other to repeat themselves. The three other fields are the impairments that move it.
media_quality.jitter_ms
integer
wymagane
Variation in the arrival time of the audio packets, in milliseconds. Audio arriving unevenly is heard as choppiness even when no packets are lost at all.
media_quality.packet_loss_pct
number
wymagane
Percentage of audio packets that never arrived. Heard as brief gaps or clipped words, and the impairment that degrades a call fastest.
media_quality.round_trip_time_ms
integer
wymagane
Round-trip time between the two ends, in milliseconds. It does not distort the audio, but above roughly 300 ms the two parties start talking over each other.
cost
object
Amount billed for this call, net of tax, at full precision. Absent until the call has been rated; unanswered or unpriced calls have no cost.
Pokaż atrybuty podrzędne
cost.amount
string
wymagane
Decimal amount as a string, in major currency units.
cost.currency_code
string
wymagane
ISO 4217 currency code.