import type { SIPOutboundConfig } from '@livekit/protocol';
import type { LLMModels, STTModelString, TTSModelString } from '../../inference/index.js';
import type { ChatContext, LLM, RealtimeModel, ToolContext } from '../../llm/index.js';
import type { STT } from '../../stt/index.js';
import type { TTS } from '../../tts/index.js';
import type { VAD } from '../../vad.js';
import { AgentTask } from '../../voice/agent.js';
import { type TurnDetectionMode } from '../../voice/agent_session.js';
import { type AudioConfig, type AudioSourceType } from '../../voice/background_audio.js';
import type { InstructionParts } from './utils.js';
export interface WarmTransferResult {
    humanAgentIdentity: string;
}
export interface WarmTransferTaskOptions {
    /** The phone number or SIP URI to dial for the human agent. */
    sipCallTo?: string;
    /**
     * ID of a pre-configured LiveKit SIP outbound trunk used to originate the call.
     * Falls back to the `LIVEKIT_SIP_OUTBOUND_TRUNK` environment variable when not provided.
     */
    sipTrunkId?: string | null;
    /** Low-level SIP connection config for originating calls through a custom SIP domain. */
    sipConnection?: SIPOutboundConfig;
    /** Optional SIP From number. Falls back to `LIVEKIT_SIP_NUMBER`. */
    sipNumber?: string;
    /** Headers to include on the outbound SIP call. */
    sipHeaders?: Record<string, string>;
    /**
     * DTMF tones to send once the human agent's call is answered, e.g. to dial an extension or
     * navigate an IVR menu (`'1234#'`). Insert `w` characters to pause ~0.5s each before/between
     * digits (`'wwww1234#'` waits ~2s, useful when the destination plays a greeting before
     * accepting input).
     */
    dtmf?: string | null;
    /**
     * How long to wait, in milliseconds, for the human agent to answer before giving up. The
     * underlying SIP API only supports whole-second granularity, so the value is rounded to the
     * nearest second.
     */
    ringingTimeout?: number | null;
    /** Audio played to the caller while they are on hold during the transfer. */
    holdAudio?: AudioSourceType | AudioConfig | AudioConfig[] | null;
    /**
     * Instructions for the human-agent briefing. Pass a full string to replace the built-in prompt
     * entirely, or {@link InstructionParts} to override individual sections (e.g. `persona`) while
     * keeping the built-in template and auto-formatted conversation history.
     */
    instructions?: InstructionParts | string;
    chatCtx?: ChatContext;
    turnDetection?: TurnDetectionMode | null;
    tools?: ToolContext;
    stt?: STT | STTModelString | null;
    vad?: VAD | null;
    llm?: LLM | RealtimeModel | LLMModels | null;
    tts?: TTS | TTSModelString | null;
    allowInterruptions?: boolean;
}
export declare class WarmTransferTask extends AgentTask<WarmTransferResult> {
    private _callerRoom;
    private _humanAgentRoom;
    private _humanAgentSession;
    private _humanAgentFailed;
    private _resolveHumanAgentFailed;
    private _humanAgentIdentity;
    private _sipCallTo;
    private _sipTrunkId;
    private _sipConnection?;
    private _sipNumber;
    private _sipHeaders;
    private _dtmf;
    private _ringingTimeout;
    private _backgroundAudio;
    private _holdAudioHandle;
    private _holdAudio;
    private _originalIoState;
    private _taskTurnDetection;
    private _allowInterruptions;
    private _logger;
    constructor(options?: WarmTransferTaskOptions);
    private static formatConversationHistory;
    onEnter(): Promise<void>;
    private buildConnectToCallerTool;
    private buildDeclineTransferTool;
    private buildVoicemailDetectedTool;
    private onHumanAgentRoomClose;
    private onCallerParticipantDisconnected;
    private setResult;
    private dialHumanAgent;
    private cleanupHumanAgentDial;
    private abortable;
    private mergeCalls;
    private setIoEnabled;
}
//# sourceMappingURL=warm_transfer.d.ts.map