Member Junction
    Preparing search index...

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

    interface VonageTelephonyServiceDeps {
        callerResolver?: ICallerIdentityResolver;
        canRunAgent?: (agentId: string, user: UserInfo) => Promise<boolean>;
        capacity?: ICallCapacity;
        coAgentResolver?: (
            targetAgentID: string | undefined,
            explicitCoAgentID: string | undefined,
            contextUser: UserInfo,
            provider: IMetadataProvider,
        ) => Promise<string>;
        engine?: TelephonyEngine;
        sessionFactory?: (
            ctx: BridgeRealtimeSessionContext,
        ) => Promise<IRealtimeSession>;
        sessionManager?: IAgentSessionManager;
        voice?: IVonageVoiceLike;
    }
    Index

    Properties

    callerResolver?: ICallerIdentityResolver

    Overrides the caller-identity resolver (defaults to the host's registration, else anonymous).

    canRunAgent?: (agentId: string, user: UserInfo) => Promise<boolean>

    Overrides the agent-permission check of the outbound gate (defaults to AIAgentPermissionHelper).

    capacity?: ICallCapacity

    Overrides the concurrent-call gate (defaults to the process-wide TelephonyCapacity).

    coAgentResolver?: (
        targetAgentID: string | undefined,
        explicitCoAgentID: string | undefined,
        contextUser: UserInfo,
        provider: IMetadataProvider,
    ) => Promise<string>

    Overrides how the co-agent that voices an agent is resolved (defaults to the shared chain the browser path uses).

    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?: TelephonyEngine
    sessionFactory?: (
        ctx: BridgeRealtimeSessionContext,
    ) => Promise<IRealtimeSession>

    Type Declaration

      • (ctx: BridgeRealtimeSessionContext): Promise<IRealtimeSession>
      • Opens a raw IRealtimeSession for the agent named in ctx. Bind this onto a bridge's session-factory seam (e.g. LiveKitAgentRoomCoordinator.Instance.SetSessionFactory(CreateBridgeRealtimeSession)).

        Parameters

        Returns Promise<IRealtimeSession>

        The live realtime session to hand to AIBridgeEngine.StartBridgeSession.

        When the agent can't be resolved, names a DriverClass no BaseAgent subclass is registered for, or no usable Realtime model is configured (surfaced from BaseAgent.StartBridgeRealtimeSession).

    sessionManager?: IAgentSessionManager

    The Voice client used to hang up a call whose session failed to start (defaults to the real client).