Member Junction
    Preparing search index...

    A real, two-way ITelephonyCallSdk over the native Vonage Voice API + WebSocket media.

    Gives the agent both hearing (inbound WebSocket media → seam audio frames) and a voice (sendAudioFrame → the native WebSocket media send path), plus working DTMF send/receive, call transfer, and hangup. Construct via BindVonageNativeCall (the factory the bridge's SetSdkFactory wants), not directly, so config resolution + the lazy loader wire consistently.

    The adapter is lazy: the native client is created and the call placed/answered at dial / answer. Handlers registered before the call exists (onAudioFrame, onDtmf, onCallEnded) are buffered and (re-)attached to the native client once the call's UUID is known — mirroring VonageCallSdk.

    Implements

    Index

    Constructors

    Methods

    • Answers an inbound call already delivered by the answer webhook: loads the native module, accepts the call's WebSocket media leg, binds the UUID, and (re-)attaches any buffered handlers.

      Parameters

      • callId: string

        The inbound call UUID from the webhook.

      Returns Promise<void>

      When the native module specifier is missing or the module can't be loaded.

    • Places an outbound call: loads the native module, constructs a client with the resolved Voice credentials, places the call (opening its WebSocket media leg), binds the UUID, and (re-)attaches any buffered handlers. Brings BOTH hearing and the agent's voice online.

      Parameters

      • toNumber: string

        Destination number to dial (E.164 recommended).

      • fromNumber: string

        The agent's caller-id / DID the call originates from.

      • Optionalargs: Record<string, unknown>

        Provider-specific dial options.

      Returns Promise<string>

      The placed call's UUID.

      When the native module specifier is missing or the module can't be loaded.

    • Registers the inbound-audio handler (what the agent hears). Buffered until the call exists, then attached; if the call is already live it attaches immediately.

      Parameters

      • cb: (pcm: ArrayBuffer) => void

        Invoked with each inbound PCM audio frame.

      Returns void

    • Sends one raw PCM frame as the agent's outbound voice — the agent's real voice onto the phone call, via the native WebSocket media send path. No-ops (without throwing) before the call exists so an early model frame never crashes the session.

      Parameters

      • pcm: ArrayBuffer

        The PCM audio bytes to speak onto the call.

      Returns void