Class Conference

Provides access to methods for managing outgoing or incoming conferences. Conference objects are obtained calling createConference method or handling the onIncoming event of a connected ConferenceManager instance.

Events

  • remoteStreams (ImmutableSet<ManagedStream> currentValue, ImmutableSet<ManagedStream> oldValue, EventInfo)
    • Emitted every time remoteStreams changes.
  • outgoingInvitations (ImmutableSet<Invitation> currentValue, Invitation<ManagedStream> oldValue)
    • Emitted every a outgoingInvitation changes.
  • status (ConferenceStatus currentValue, ConferenceStatus<ManagedStream> oldValue)
    • Emitted every time the conference status changes. deprecated
  • remoteParticipants (Map<gatewayUsername, 'IN_CALL'|'HOLD'> currentValue, Map<gatewayUsername, 'IN_CALL'|'HOLD'> oldValue)
    • Emitted every time the participants list changes.
  • transferError
    • Emitted when an error occurs in a transfer.
  • participantAdded (gatewayUsername gatewayUsername)
    • Emitted when a new participant joins the conference
  • participantRemoved (gatewayUsername gatewayUsername)
    • Emitted when a participant leaves the conference
  • participantHold (gatewayUsername gatewayUsername)
    • Emitted when a participant starts holding the call
  • participantUnhold (gatewayUsername gatewayUsername)
    • Emitted when a participant stops holding the call
  • remoteStreamAdded (RemoteStreamAddedEvent)
    • Emitted on remote stream added
  • remoteStreamRemove (RemoteStreamRemovedEvent)
    • Emitted on remote stream removed
  • speakerChanged(SpeakerChangedEvent)
    • Emitted each time a conference participant starts or stops talking

Hierarchy

  • Conference

Constructors

Properties

emitter: EventEmitter2 = ...
invitationCount: number = 0

Use to keep the number of invitations sent in this conference

joinTimestamp: undefined | number
localMediaHandler: LocalMediaHandler
muteRequest$: Observable<boolean>
outgoingInvitations: Set<Invitation> = ...
participants$: Observable<Record<string, Participant>>
remoteParticipants: Map<string, "HOLD" | "IN_CALL"> = ...
remoteStreams: Map<string, ManagedStream[]> = ...
status: BehaviorSubject<ConferenceStatus> = ...
subscription: Subscription = ...
transferingCall: boolean = false

Accessors

Methods

  • This is assuming that if it does not has an invitation answered 200, it could never been in the room Made to solve PSTN problems (users with early media cannot be re-invited) TODO We need a proper way to check if the user is already joined

    Parameters

    • gatewayUsername: string

    Returns boolean

  • Invites an agent to a conference

    Parameters

    • mediaTypes: MediaTypes = ...

      the media types that will be used to call an agent

    • contextInfo: Record<string, string> = {}

      arbitrary context that can be sent to an agent

    • Optional token: string

      third-party call ID.

    Returns Promise<{
        code: number;
        whoAccepted?: string;
    }>

  • Invites an agent with a particular skill to a conference

    Parameters

    • mediaTypes: MediaTypes = ...

      the media types that will be used to call an agent

    • skill: string = ''

      the skill an agent must have in order to be invited

    • contextInfo: Record<string, string> = {}

      arbitrary context that can be sent to an agent

    • Optional token: string

      third-party call ID.

    Returns Promise<{
        code: number;
        whoAccepted?: string;
    }>

  • Invites the voicemail to a conference

    Parameters

    • mediaTypes: MediaTypes = ...

      the media types that will be used to call the voicemail

    Returns Promise<{
        code: number;
        whoAccepted?: string;
    }>

  • Expels a participant from this conference

    Parameters

    • participant: string
    • Optional session: string

    Returns Promise<void>

  • Expels a list of participant from this conference

    Parameters

    • participants: string[]

    Returns Promise<void>

  • Returns the current participant count. Includes in the count the users with active invitations.

    Returns number

  • Returns the timestamp when the join to this conference was completed

    Returns

    timestamp when the join was completed

    Returns undefined | number

  • Returns a Set of strings containing the gateway username of every remote participant

    Deprecated

    Returns Set<string>

  • Returns the remote participants

    Returns Map<string, "HOLD" | "IN_CALL">

  • Returns a boolean value indicating if at least one of the remote conference participants has a video track

    Returns boolean

  • Invites many participants to a conference.

    Returns

    A promise with an array of invitation objects waitUntilResolve Will resolve once the invitation is answered. The resolution will have two fields: code (a SIP code) and whoAccepted (userId of the participant who accepted)

    Parameters

    • participants: string[]
    • Optional mediaTypes: MediaTypes

      the MediaTypes for this invitation

    • context: Record<string, string> = {}

      Arbitrary context that can be sent when making an invite

    Returns Promise<{
        waitUntilResolved: (() => Promise<{
            code: number;
            whoAccepted?: string;
        }>);
    }[]>

  • Invites a new participant to this conference

    Throws

    throw error when a participant has already invited or is joined to the conference.

    Returns

    A promise with an object with two properties: SIP code (SIP code of the response) and whoAccepted (User id of the participant that accepted the invite).

    Parameters

    • participant: string

      A participant can be both an internal or an external user.

    • Optional mediaTypes: MediaTypes

      the MediaTypes of this invitation

    • context: Record<string, string> = {}

    Returns Promise<{
        code: number;
        whoAccepted?: string;
    }>

  • Invites a list of new participant to this conference

    Parameters

    • participants: string[]

    Returns Promise<{
        code: number;
        whoAccepted?: string;
    }[]>

  • Leaves the conference

    Parameters

    • Optional errorCode: number

      the rejection cause when an invitation is received and the conference has not been joined.

    Returns Promise<void>

  • Parameters

    • to: string
    • muted: boolean = true

    Returns Promise<void>

  • Parameters

    • participant: {
          status: "HOLD" | "IN_CALL";
          user: string;
      }
      • status: "HOLD" | "IN_CALL"
      • user: string

    Returns Promise<void>

  • Parameters

    • participant: {
          isTalking: boolean;
          remoteGateway: string;
      }
      • isTalking: boolean
      • remoteGateway: string

    Returns void

  • Create an unattendedCallTransfer towards a user in the system

    Parameters

    • participant: string
    • mediaTypes: MediaTypes = ...

      the current media types will be used if nothing is specified

    Returns Promise<void>

  • Stop local hold Republishes all previously published media, subscribes to previously subscribed media and notifies new status to other participants.

    Returns Promise<void>

  • Manages the Invitations Set and events.

    Parameters

    • invitationToAdd: any
    • invitationToRemove: any

    Returns void

  • Parameters

    • participant: string
    • resolvedInvite: {
          code: number;
          whoAccepted?: string;
      }
      • code: number
      • Optional whoAccepted?: string

    Returns void

  • Parameters

    • updater: ((participants: Map<string, "HOLD" | "IN_CALL">) => Map<string, "HOLD" | "IN_CALL">)
        • (participants: Map<string, "HOLD" | "IN_CALL">): Map<string, "HOLD" | "IN_CALL">
        • Parameters

          • participants: Map<string, "HOLD" | "IN_CALL">

          Returns Map<string, "HOLD" | "IN_CALL">

    Returns void

Generated using TypeDoc