Your phone system, connected to the telephone network.
A SIP trunk links your PBX or softphone to Bird, and Bird routes each call through a carrier to the public telephone network. The calls you place and the calls arriving on your numbers land in the same record.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({
apiKey: process.env.BIRD_API_KEY!,
});
for await (const call of bird.voice.list({ direction: "outbound" })) {
console.log(call.id, call.status, call.to);
}
Bird Verify
+1 (500) 555-0010
Yourverificationcodeisfourtwonineoneseven.
Every call, on the record.
Read every call from the language you already use.
The public call API is read-only: list the calls in a workspace and fetch one by id. A call is placed by your phone system over the trunk, not by an API request.
Ten parts of a working voice setup.
Trunking, number answering, and the records and events that follow every call.
- 01
SIP trunks you control
Your phone system connects over a trunk with its own address, credentials and allowed IP ranges.
- 02
Outbound over SIP
Your PBX sends a SIP INVITE to the trunk's SIP domain, and Bird routes the call to a carrier.
- 03
Checks before a carrier is dialed
Bird reads the caller ID, destination country, limits and wallet balance first, and refuses a failing call before a carrier is involved.
- 04
Inbound on the numbers you hold
A number delivers to one of your trunks, forwards to a number you have verified, or rejects. Every number starts on reject.
- 05
A first call with nothing installed
The dashboard phone places a call from the browser over your own trunk, on a short-lived session credential.
- 06
Any SIP client
PBXs, desktop softphones and command-line tools, with worked configurations for Asterisk, FreePBX, Zoiper and baresip.
- 07
Destinations you enable
A call to a country the workspace has not enabled is refused with destination_not_enabled before it reaches a carrier.
- 08
Verified caller IDs
Present a number you have verified as the caller, or forward an inbound call to one.
- 09
A record for every call
Status, duration and cost on each call, and the specific reason on each refusal.
- 10
Calls and events over the API
listVoiceCalls and getVoiceCall read call records, and voice_call.initiated, answered and ended arrive as webhooks.
我们为何打造 Voice
Voice that fits the phone system you already run.
Bird connects your PBX or softphone over a SIP trunk and routes each call to the telephone network. The records and events that follow use the same envelope as every other Bird channel, so the operational surface is one you already know.
import { BirdClient } from "@messagebird/sdk";
const bird = new BirdClient({
apiKey: process.env.BIRD_API_KEY!,
});
for await (const call of bird.voice.list({ direction: "outbound" })) {
console.log(call.id, call.status, call.to);
}
Three events, on every call.
Each one carries the same call identity fields, so a consumer can follow a call from the first ring to its outcome.
Bird delivers each event at least once, so a call's initiated event can repeat when a signaling retry replays. Deduplicate on webhook-id.
voice_call.initiatedBird received the INVITE and began routing.voice_call.answeredThe recipient answered and billable time started. An unanswered call does not emit this event.voice_call.endedThe call is over, and the payload adds how it ended: answered, no_answer, failed, rejected or unknown.
Read a call the same way you read a message.
The two public call operations use the same auth and the same envelope as every other Bird resource.
List calls.
Page through a workspace's calls, filtered by status, direction, trunk or number.
Read one call.
Fetch a call at any point in its life. Duration, billable time and cost fill in once it ends.
Send your first request before you write any code.
The whole public API is a Postman collection, converted from the same OpenAPI specification the SDKs are generated from, with an example request and response on every endpoint. Fork it into your own workspace, set an API key, and send a live request.
Put it into practice.
Continue with the documentation, guides and examples for this topic. Resources are in English.