@twilio/flex-sdk
    Preparing search index...

    Class StartOutboundCall

    Initiates an outbound voice call to a specified phone number.

    The phone number to call.

    Optional configuration parameters for customizing the outbound call process.

    A promise that resolves to a VoiceCall object, representing the outbound call.

    import { createClient, Reservation } from "@twilio/flex-sdk";
    import { StartOutboundCall, StartOutboundCallOptions } from "@twilio/flex-sdk/actions/Voice";

    async function startOutboundCall() {
    const client = await createClient("SDK_TOKEN");
    const reservationCanceledHandler = (reservation: Reservation) => {
    console.log(
    `Reservation canceled with reason https://www.twilio.com/docs/api/errors/${reservation.canceledReasonCode}`
    );
    reservation.off("canceled", reservationCanceledHandler);
    };
    const startOutboundCallOptions: StartOutboundCallOptions = {
    reservationEventListeners: {
    canceled: reservationCanceledHandler
    }
    };
    const startOutboundCallAction = new StartOutboundCall("+15555555555", startOutboundCallOptions);
    const call = await client.execute(startOutboundCallAction);
    }

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods