Skip to main content
A Telnyx connector streams live audio from a Telnyx call into a Zero Runtime room using TeXML media streaming. You point a Telnyx TeXML application at the connector, and Telnyx opens a bidirectional WebSocket that carries the call audio into the room. No SIP trunk is required. Setup takes three steps: create the connector, configure your TeXML application, and route the call to a room. If you are new to connectors, read the Connectors Overview first.

How It Works

  1. A caller dials your Telnyx number.
  2. Telnyx sends a TeXML voice webhook to your connector’s webhook URL.
  3. Zero Runtime resolves routing and responds with TeXML that tells Telnyx where to stream the audio:
  4. Telnyx opens that WebSocket and streams audio. Zero Runtime claims the call, joins the room, and bridges audio in both directions. The <Pause> element keeps the call alive while streaming.
You do not implement the WebSocket protocol; Telnyx handles it. Audio is PCMU (G.711 μ-law) at 8 kHz, in 20 ms frames of 160 bytes. The call is identified by the ref value in the stream URL, because Telnyx exposes a call_control_id in its stream start event rather than the TeXML CallSid.

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 Authorization header yourself.
  • An active Telnyx phone number.
  • A Telnyx TeXML application, created under Voice > TeXML in the Telnyx Portal.
Install the Server SDK for your language:
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 fallback roomId 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 set it on the TeXML application in Step 2.
Keep the webhook URL private. Anyone who has the webhook URL can route calls into your room, because the key is part of the URL. If it leaks, rotate the key to invalidate the old URL.

Step 2: Configure Telnyx

Telnyx routes calls through a TeXML application. Point its voice webhook at the webhookUrl from Step 1, then assign your number to that application.
1

Open your TeXML application

In the Telnyx Portal, go to Voice > TeXML Applications and create or edit an application.
2

Set the voice webhook

Set the inbound Voice webhook URL to the webhookUrl, with the HTTP method set to POST, and save the application.
3

Assign your number to the application

Go to Numbers > My Numbers, open your number, assign it to the TeXML application, and save.
That is the entire provider-side setup. When the number rings, Telnyx posts to the webhook and Zero Runtime replies with the <Start><Stream> TeXML 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 roomId you set in Step 1 sends every call to one fixed room. Best for a single destination or for testing.
  • Per-call override. Append a roomId query parameter to the webhook 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.
If you set roomId in Step 1, you can skip this step and move straight to testing.

Step 4: Test an Inbound Call

  1. Add a participant or AI agent to the target room, so there is audio to exchange.
  2. Call your Telnyx number from any phone.
  3. Confirm that the caller hears the room and the room hears the caller.
If you registered lifecycle webhooks, you will see 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 TeXML application with the new 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 as call-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.

Troubleshooting

Reference