The real Vonage client bindings (Voice API + websocket media). Defaults to an unbound implementation whose every method throws the explicit "bind the real Vonage client" error.
Answers an inbound call that has routed to the agent's number.
The platform-native identifier of the inbound call to answer (from the inbound webhook).
A promise resolving once the call is answered and the media path is live.
Places an outbound call FROM the agent's number TO a destination and brings the bot leg online.
The destination phone number to dial (E.164 recommended).
The agent's caller-id / DID the call originates from.
Optionalargs: Record<string, unknown>Provider-specific dial parameters (resolved credential refs, region, recording flags, …).
The platform-native call identifier (e.g. Twilio Call SID) for the placed call.
Hangs up the call and releases all platform resources.
The platform-native identifier of the call to end.
A promise resolving once the call has been torn down.
Registers a callback for inbound raw audio frames from the call — what the agent hears. There is a single remote party, so frames need no per-speaker label (the bridge stamps the caller's id). "Latest handler wins."
Invoked with each inbound PCM audio frame.
Registers a callback fired when the call ends — the remote party hangs up, the carrier drops it, or the provider tears it down. "Latest handler wins."
Invoked when the call has ended.
Registers a callback for inbound DTMF tones the remote party presses. "Latest handler wins."
Invoked with each received DTMF digit string.
Sends one raw PCM audio frame as the agent's outbound voice into the call (the provider's media- stream / virtual-mic path).
The PCM audio bytes to send.
Sends DTMF touch-tones on the call (the agent dialing into an IVR, entering a code, …).
The DTMF digit string to send (e.g. '1234#').
A promise resolving once the tones have been sent.
Transfers the call to another party (a number or platform endpoint).
The platform-native identifier of the call to transfer.
The transfer destination (a phone number or platform endpoint identifier).
A promise resolving once the transfer has been initiated.
Vonage's implementation of the ITelephonyCallSdk telephony seam over the Vonage Voice API + websocket media. import('./vonage-bridge').VonageBridge drives this; production constructs it with real IVonageClientBindings, tests inject a
FakeVonageCallSdkdirectly (no need for this adapter at all in tests).The adapter tracks the active call UUID so the per-call websocket / Voice API operations can be addressed. It never imports the
@vonage/server-sdkSDK — all Vonage specifics live behind IVonageClientBindings.