Member Junction
    Preparing search index...

    Production IVonageClientBindings over the real Vonage Voice API + WebSocket media, expressed against the injected IVonageVoiceLike / IVonageMediaPump surfaces so it builds and unit-tests with no @vonage/server-sdk install and no network.

    • createCall → Voice REST createCall with the NCCO connect websocket action.
    • acceptInbound → no REST call (the answer webhook already returned the connect NCCO); the websocket for the delivered call UUID is what "accepting" means — handled by onWebsocketAudio.
    • hangupCall / transferCall / playDigits → Voice REST.
    • pushWebsocketAudio / onWebsocketAudio → WebSocket media frames, transcoded through the T0 codec.

    Implements

    Index

    Constructors

    Methods

    • Places an outbound call via the Vonage Voice API (POST /v1/calls) with an NCCO that connects a bidirectional websocket to the agent's media leg.

      Parameters

      • toNumber: string

        Destination number (E.164).

      • fromNumber: string

        The agent's Vonage number / verified caller-id the call originates from.

      • Optionalargs: Record<string, unknown>

        Provider-specific options (event-webhook URL, websocket media URL, recording flags, …).

      Returns Promise<string>

      The created call UUID.

    • Registers the inbound DTMF callback (NCCO input/dtmf results delivered to the event webhook).

      Parameters

      • callUuid: string

        The call UUID.

      • cb: (digits: string) => void

        Invoked with each received DTMF digit string.

      Returns void

    • Registers the inbound websocket audio callback for the call (what the agent hears).

      Parameters

      • callUuid: string

        The call UUID whose inbound media to subscribe to.

      • cb: (pcm: ArrayBuffer) => void

        Invoked with each inbound PCM audio frame.

      Returns void

    • Transfers the live call (Voice API PUT /v1/calls/:uuid with { action: 'transfer', destination: { type: 'ncco', ncco: [...] } }).

      Parameters

      • callUuid: string

        The call UUID to redirect.

      • toNumber: string

        The transfer destination.

      Returns Promise<void>