Interface CallRecord

Full record of a voice call -- used for tracking, persistence, and status queries.

interface CallRecord {
    callId: string;
    providerCallId?: string;
    provider: VoiceProviderName;
    state: CallState;
    direction: CallDirection;
    mode: CallMode;
    fromNumber: string;
    toNumber: string;
    seedId?: string;
    transcript: TranscriptEntry[];
    processedEventIds: string[];
    streamSid?: string;
    createdAt: number;
    endedAt?: number;
    errorMessage?: string;
    metadata?: Record<string, unknown>;
}

Properties

callId: string

Unique call identifier (UUID).

providerCallId?: string

Provider-assigned call ID (e.g., Twilio CallSid).

Which provider is handling this call.

state: CallState

Current state in the call lifecycle.

direction: CallDirection

Call direction.

mode: CallMode

Call interaction mode.

fromNumber: string

E.164 phone number of the caller.

toNumber: string

E.164 phone number being called.

seedId?: string

Agent seed ID (if bound to a specific agent).

transcript: TranscriptEntry[]

Conversation transcript.

processedEventIds: string[]

IDs of webhook events already processed (idempotency).

streamSid?: string

Stream SID for media streams (Twilio-specific).

createdAt: number

Unix timestamp (ms) when the call was created.

endedAt?: number

Unix timestamp (ms) when the call reached a terminal state.

errorMessage?: string

Error message if state is 'error' or 'failed'.

metadata?: Record<string, unknown>

Provider-specific metadata.