Skip to main content
The live IVR call accepts the same WebRTC transport as WhatsApp calls. The audio goes over UDP with Opus and forward error correction (FEC), and copes better with unstable Wi-Fi and 4G than audio over the WebSocket. If the network blocks WebRTC, the SDK falls back to the WebSocket on its own without dropping the call.
You need wallet balance and the account API Key. Billing, recording and the call.* webhooks are the same as the live IVR call: only the audio path changes. No WhatsApp connection is needed.

Installation

On Node, WebRTC uses an optional package. Without it, the call stays on the WebSocket:

In the browser

The example has two parts: a route on your backend, which keeps the API Key and dials, and the page, which talks and listens.

Backend: dial

dapi.voice.liveStart() calls POST /voice/live/start and returns callId and wsUrl. Only those two go to the browser.
server.js
The phone starts ringing as soon as the route responds. Open the call on the page within 30 seconds, or it is hung up and the balance reservation is returned.

Page: talk and listen

index.html
ura.js
The SDK asks for the microphone, plays the voice of whoever answered and only sends your audio after accepted. The page must be on HTTPS (or localhost), and d-api-sdk comes in through a bundler (Vite, webpack, Next.js).

On Node (bots and AI agents)

dapi.voice.live() dials and opens the call. The audio reaches your code raw: PCM s16le, 16 kHz, mono, in 20 ms frames (320 samples).
bot.js
Audio sent before accepted is dropped. Large bursts get queued and arrive late, so send in real time.

IVR events

They arrive on call.on("event"), the same as on the WebSocket: Telephony emits neither calling nor ringing: until accepted, the phone is ringing. A call that ends without accepted was not answered and is not charged, and neither is a false-answer. The reason values are listed in live IVR call. The options (fallback, audio, webrtcConnectTimeoutMs, resume) and the reasons for falling back to the WebSocket are the same as for WhatsApp calls: see WebRTC on WhatsApp calls.

Next steps

Live IVR (Stream)

Billing, limits, recording and the WebSocket protocol.

IVR webhooks

call.started, call.answered, call.dtmf, call.ended and call.audio.