How It Works
- A caller dials your Plivo number.
- Plivo sends an Answer URL request to your connector’s webhook URL.
-
Zero Runtime resolves routing and responds with Plivo XML that tells Plivo where to stream the audio:
- Plivo opens that WebSocket and streams audio. Zero Runtime claims the call, joins the room, and bridges audio in both directions.
audio/x-mulaw) at 8 kHz, in 20 ms frames of 160 bytes, and the call is identified by Plivo’s CallUUID.
Prerequisites
- A Zero Runtime account with an API key and secret from the Zero runtime Dashboard. The Server SDK signs and attaches its own management token on every request, so you never set an
Authorizationheader yourself. - An active Plivo phone number.
- Your Plivo Auth ID and Auth Token, from the Plivo Console.
The Server SDK requires Node.js 18+, Go 1.23+, or Rust 1.75+. Keep your secret on the server — it signs tokens, so it must never reach a browser or mobile app.
Step 1: Create a Connector
Create the connector with a single Server SDK call. Setting the fallbackroomId here is the fastest path to a working call, since every call then joins that room.
connectors.create accepts the following options.
The call returns the connector, including the
webhookUrl you need for the next step.
Copy the
webhookUrl. You will use it as the Answer URL in Step 2.
Step 2: Configure Plivo
Plivo routes calls through an application. Point the application’s Answer URL at thewebhookUrl from Step 1, then assign your number to that application.
1
Open your Plivo XML application
In the Plivo Console, go to Voice > Applications > XML and create or edit an application.
2
Set the Answer URL
Set the Answer URL to the
webhookUrl, with the method set to POST, and save the application.3
Assign your number to the application
Go to Phone Numbers > Numbers, open your number, set its Plivo Application to the application you just configured, and save.
<Stream> XML automatically.
Step 3: Route the Call
Routing decides which room a call joins. You have three options, from simplest to most flexible:- Connector default. The
roomIdyou set in Step 1 sends every call to one fixed room. Best for a single destination or for testing. - Per-call override. Append a
roomIdquery parameter to the Answer URL (...whk_xxx?roomId=<roomId>) to target a specific room for that number. - Routing rules. For different callers or numbers landing in different rooms, or to attach an AI agent, create a routing rule and reference it with
defaultRuleId.
roomId in Step 1, you can skip this step and move straight to testing.
Step 4: Test an Inbound Call
- Add a participant or AI agent to the target room, so there is audio to exchange.
- Call your Plivo number from any phone.
- Confirm that the caller hears the room and the room hears the caller.
call-started, then call-answered, and finally call-hangup when the call ends. These are the quickest way to confirm the flow end to end.
Manage the Connector
List your connectors, or fetch a single one by ID:Rotate the Webhook Key
Rotating the key invalidates the current webhook URL immediately and returns a new one. Update the Plivo Answer URL right after, or calls will stop reaching Zero Runtime.Delete a Connector
Lifecycle Webhooks
To track calls on your server, register a webhook URL and listen for events such ascall-started, call-answered, and call-hangup. Each request carries a videosdk-signature header (a base64 RSA-SHA256 signature of the body) so you can verify it. Connectors use the same webhook system as SIP, so see SIP Webhooks for the full event list, payloads, and registration.