Member Junction
    Preparing search index...

    Injectable collaborators (production defaults are wired in the constructor; fakes in tests).

    interface LiveKitSipTelephonyServiceDeps {
        callerResolver?: ICallerIdentityResolver;
        canRunAgent?: (agentId: string, user: UserInfo) => Promise<boolean>;
        capacity?: ICallCapacity;
        coAgentResolver?: (
            targetAgentID: string | undefined,
            explicitCoAgentID: string | undefined,
            contextUser: UserInfo,
            provider: IMetadataProvider,
        ) => Promise<string>;
        coordinator?: LiveKitAgentRoomCoordinator;
        engine?: SipBridgeEngine;
        handoff?: RoomHandoffEngine;
        inboundHandler?: ILiveKitSipInboundHandler;
        sessionManager?: IAgentSessionManager;
        sip?: LiveKitSipService;
        starter?: RoomCallSessionStarter;
    }
    Index

    Properties

    callerResolver?: ICallerIdentityResolver
    canRunAgent?: (agentId: string, user: UserInfo) => Promise<boolean>
    capacity?: ICallCapacity
    coAgentResolver?: (
        targetAgentID: string | undefined,
        explicitCoAgentID: string | undefined,
        contextUser: UserInfo,
        provider: IMetadataProvider,
    ) => Promise<string>

    Type Declaration

      • (
            targetAgentID: string | undefined,
            explicitCoAgentID: string | undefined,
            contextUser: UserInfo,
            provider: IMetadataProvider,
        ): Promise<string>
      • Resolves the co-agent (the Realtime-type agent that voices the target agent) via the metadata-driven co-agent resolution chain — first match wins:

        1. Explicit — explicitCoAgentID. A per-call override; an invalid candidate throws (the caller asked for something specific, so there is no silent fallback).
        2. Per-agent persona — the target agent's DefaultCoAgentID. An invalid reference logs and falls through (stale metadata must degrade, never break live calls).
        3. Per-type default — an Active AIAgentCoAgent row of Type 'CoAgent' whose TargetAgentTypeID is the target's type (IsDefault first, then lowest Sequence). Same tolerant semantics as step 2.
        4. Global default — the seeded REALTIME_CO_AGENT_NAME agent (with a deprecated fallback to LEGACY_REALTIME_CO_AGENT_NAME). Throws when absent: realtime is unconfigured in this deployment.

        Every candidate from steps 1–3 must exist, be Active, and be of the REALTIME_AGENT_TYPE_NAME type.

        Parameters

        • targetAgentID: string | undefined

          The agent the co-agent will voice (drives steps 2–3).

        • explicitCoAgentID: string | undefined

          The explicit co-agent choice, when supplied (step 1).

        • contextUser: UserInfo

          The user the metadata reads run as.

        • provider: IMetadataProvider

          The request-scoped metadata provider.

        Returns Promise<string>

        The resolved co-agent's id (canonical casing from the metadata cache).

        When an explicit candidate is invalid, or no co-agent is configured at all.

    engine?: SipBridgeEngine
    inboundHandler?: ILiveKitSipInboundHandler

    Optional custom inbound handler (e.g. for Contact Center entry point routing).

    sessionManager?: IAgentSessionManager

    Overrides the room-call starter (tests).