@jambonz/sdk
    Preparing search index...

    Interface CallSession

    Call session data provided in webhook requests and WebSocket session:new messages.

    interface CallSession {
        call_sid: string;
        account_sid: string;
        application_sid: string;
        direction: "inbound" | "outbound";
        from: string;
        to: string;
        call_id: string;
        sip_status: number;
        sip_reason?: string;
        caller_name?: string;
        caller_id?: string;
        call_status?: string;
        originating_sip_trunk_name?: string;
        originating_sip_ip?: string;
        service_provider_sid?: string;
        trace_id?: string;
        parent_call_sid?: string;
        api_base_url?: string;
        sip?: {
            headers: Record<string, string>;
            body?: string;
            method?: string;
            uri?: string;
            calledNumber?: string;
            callingNumber?: string;
            protocol?: string;
            source_address?: string;
            source_port?: string | number;
        };
        env_vars?: Record<string, string>;
        defaults?: {
            synthesizer?: { vendor?: string; language?: string; voice?: string };
            recognizer?: { vendor?: string; language?: string };
        };
        customerData?: Record<string, unknown>;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Additional properties.

    Index

    Properties

    call_sid: string

    Unique call identifier.

    account_sid: string

    Account identifier.

    application_sid: string

    Application identifier.

    direction: "inbound" | "outbound"

    Call direction.

    from: string

    Caller phone number or SIP URI.

    to: string

    Called phone number or SIP URI.

    call_id: string

    SIP Call-ID header.

    sip_status: number

    SIP response status code.

    sip_reason?: string

    SIP reason phrase.

    caller_name?: string

    Caller display name from the SIP From header.

    caller_id?: string

    Caller ID value (phone number or SIP user).

    call_status?: string

    Call status.

    originating_sip_trunk_name?: string

    Name of the originating SIP trunk as configured in jambonz.

    originating_sip_ip?: string

    IP address of the originating SIP trunk.

    service_provider_sid?: string

    Service provider SID.

    trace_id?: string

    Distributed tracing ID.

    parent_call_sid?: string

    Call SID of the parent call (present for adulting / child call scenarios).

    api_base_url?: string

    jambonz REST API base URL for mid-call control.

    sip?: {
        headers: Record<string, string>;
        body?: string;
        method?: string;
        uri?: string;
        calledNumber?: string;
        callingNumber?: string;
        protocol?: string;
        source_address?: string;
        source_port?: string | number;
    }

    Raw SIP INVITE message (drachtio SipRequest, serialized). Only present for WebSocket and HTTP POST transports. See https://drachtio.org/api#sip-request for the full API.

    Type Declaration

    • headers: Record<string, string>

      SIP headers as key-value pairs. Custom X-* headers are included.

    • Optionalbody?: string

      SIP message body (typically SDP).

    • Optionalmethod?: string

      SIP method (always 'INVITE' for session:new).

    • Optionaluri?: string

      Request-URI from the SIP INVITE.

    • OptionalcalledNumber?: string

      Phone number extracted from the Request-URI.

    • OptionalcallingNumber?: string

      Calling phone number from P-Asserted-Identity or From header.

    • Optionalprotocol?: string

      Transport protocol (e.g. 'udp', 'tcp', 'tls').

    • Optionalsource_address?: string

      IP address of the sender.

    • Optionalsource_port?: string | number

      Port of the sender.

    env_vars?: Record<string, string>

    Application environment variables configured in the jambonz portal.

    defaults?: {
        synthesizer?: { vendor?: string; language?: string; voice?: string };
        recognizer?: { vendor?: string; language?: string };
    }

    Default speech settings for the account.

    customerData?: Record<string, unknown>

    Custom data attached via the REST API when creating an outbound call.