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
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
Page: talk and listen
index.html
ura.js
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
accepted is dropped. Large bursts get queued and arrive late,
so send in real time.
IVR events
They arrive oncall.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.