@langwatch/scenario
    Preparing search index...

    Interface TwilioAgentAdapterOptions

    interface TwilioAgentAdapterOptions {
        accountSid: string;
        allowedCallers?: readonly string[];
        authToken: string;
        fetchImpl?: (
            input: string | URL | Request,
            init?: RequestInit,
        ) => Promise<Response>;
        httpPort?: number;
        onDtmf?: (digit: string) => void;
        phoneNumber: string;
        publicBaseUrl?: string;
        rest?: TwilioRESTHelper;
        role?: AgentRole;
        validateSignature?: boolean;
    }
    Index

    Properties

    accountSid: string
    allowedCallers?: readonly string[]

    Allowed-callers filter for inbound calls. Unset = any caller accepted.

    authToken: string
    fetchImpl?: (
        input: string | URL | Request,
        init?: RequestInit,
    ) => Promise<Response>

    Optional fetch override for the REST client. Tests pass an in-memory mock so unit tests can verify REST traffic without real Twilio.

    httpPort?: number

    HTTP server port. 0 = OS-assigned (recommended for tests).

    onDtmf?: (digit: string) => void

    Callback invoked when the remote side sends DTMF mid-call.

    phoneNumber: string

    Twilio-owned phone number in E.164 format (e.g. "+14155551234").

    publicBaseUrl?: string

    HTTPS URL routing to this machine. Required at connect() time.

    rest?: TwilioRESTHelper

    Optional REST helper override. When provided, replaces the default TwilioRESTHelper constructed from accountSid/authToken. Lets tests inject a fully-stubbed REST surface.

    role?: AgentRole

    Role under test — AGENT (default) or USER.

    validateSignature?: boolean

    Reject inbound webhooks without a valid X-Twilio-Signature. Tests pass false to bypass; production callers must leave on.