Home Reference Source
import {Conference} from '@quobis/sippojs'
public class | source

Conference

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

Events

Member Summary

Public Members
public

emitter: EventEmitter

public

Use to keep the number of invitations sent in this conference

public get

Check if conference is on hold state.

Method Summary

Public Methods
public

async callAgent(mediaTypes: MediaTypes, contextInfo: Object, token: Object): Promise

Invites an agent to a conference

public

async callSkilledAgent(mediaTypes: MediaTypes, skill: string, contextInfo: Object): Promise

Invites an agent with a particular skill to a conference

public

Indicates if participants can be invited to this conference or not

public

cancelInvitation(invitation: Invitation, session: string)

Cancels a invitation of this conference

public

expelParticipant(participant: string, session: string): Promise

Expels a participant from this conference

public

expelParticipants(participants: string[]): Promise

Expels a list of participant from this conference

public

Returns the current participant count.

public

Returns the ID of the conference

public

Returns the invitation to the conference if the participant was invited.

public

Returns the timestamp when the join to this conference was completed

public

Allows access to local streams and actions related to changing which local media is shared

public

Returns a Set of outgoing invitations

public

Returns the username of the conference's owner

public

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

public

getRemoteParticipants(): ImmutableMap<string, 'IN_CALL'|'HOLD'>

Returns the remote participants

public

Returns a Map containing a list of ManagedStreams per participant (gateway user name)

public

Returns a Set of strings containing the address of remote participants (gateway user names) that are also wac users

public

Returns the current status of the conference

public

Returns an observable for the status of the conference

public

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

public

async hold(): Promise

Local hold Stop publishing and subscribing to the media in the conference

public

async inviteMany(participants: InviteParticipants, session: String, mediaTypes: MediaTypes, autoAccepted: boolean, resolve: boolean, context: object): Promise<Object[]>

Invites many participants to a conference.

public

async inviteParticipant(participant: String, session: String, mediaTypes: MediaTypes, autoAccepted: boolean, requestId: string, resolve: boolean, context: object): Promise<Object>

Invites a new participant to this conference

public

inviteParticipants(participants: string[]): Promise

Invites a list of new participant to this conference

public

Check if a conference is being transfering

public
public

async join(): Promise

Connects to the conference

public

async leave(errorCode: number): Promise

Leaves the conference

public

sendDtmf(value: string): Promise<undefined, Error

Send data to the audio's room

public

unattendedCallTransfer(participant: string, mediaTypes: MediaTypes): Promise

Create an unattendedCallTransfer towards a user in the system

public

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

public

updateMedia(audio: *, video: *, screen: *): *

public

updateOutgoingInvitationsForParticipants(gatewayUsernames: *, mediaTypes: *, autoAccepted: *)

public

updateOutgoingResolvedInvitationsForParticipant(participant: *, resolvedInvite: *)

Public Members

public emitter: EventEmitter source

public invitationCount: boolean source

Use to keep the number of invitations sent in this conference

public get isOnHold: boolean source

Check if conference is on hold state.

Public Methods

public async callAgent(mediaTypes: MediaTypes, contextInfo: Object, token: Object): Promise source

Invites an agent to a conference

Params:

NameTypeAttributeDescription
mediaTypes MediaTypes

the media types that will be used to call an agent

contextInfo Object
  • optional
  • default: {}

arbitrary context that can be sent to an agent

token Object
  • optional

third-party call ID.

Return:

Promise

public async callSkilledAgent(mediaTypes: MediaTypes, skill: string, contextInfo: Object): Promise source

Invites an agent with a particular skill to a conference

Params:

NameTypeAttributeDescription
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 Object
  • optional
  • default: {}

arbitrary context that can be sent to an agent

Return:

Promise

public canManage(): boolean source

Indicates if participants can be invited to this conference or not

Return:

boolean

public cancelInvitation(invitation: Invitation, session: string) source

Cancels a invitation of this conference

Params:

NameTypeAttributeDescription
invitation Invitation
session string
  • optional

public expelParticipant(participant: string, session: string): Promise source

Expels a participant from this conference

Params:

NameTypeAttributeDescription
participant string
session string
  • optional

Return:

Promise

public expelParticipants(participants: string[]): Promise source

Expels a list of participant from this conference

Params:

NameTypeAttributeDescription
participants string[]

Return:

Promise

public getCurrentParticipants(): number source

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

Return:

number

public getId(): string source

Returns the ID of the conference

Return:

string

public getInvite(): ConferenceInvite source

Returns the invitation to the conference if the participant was invited.

public getJoinTimestamp(): number source

Returns the timestamp when the join to this conference was completed

Return:

number

timestamp when the join was completed

public getLocalMediaHandler(): LocalMediaHandler source

Allows access to local streams and actions related to changing which local media is shared

public getOutgoingInvitations(): ImmutableSet<Invitation> source

Returns a Set of outgoing invitations

public getOwner(): string source

Returns the username of the conference's owner

Return:

string

public getRemoteGatewayUsernames(): ImmutableSet<string> source

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

Return:

ImmutableSet<string>

public getRemoteParticipants(): ImmutableMap<string, 'IN_CALL'|'HOLD'> source

Returns the remote participants

Return:

ImmutableMap<string, 'IN_CALL'|'HOLD'>

public getRemoteStreams(): ImmutableMap<string, ManagedStream[]> source

Returns a Map containing a list of ManagedStreams per participant (gateway user name)

public getRemoteWacAddresses(): ImmutableSet<string> source

Returns a Set of strings containing the address of remote participants (gateway user names) that are also wac users

Return:

ImmutableSet<string>

public getStatus(): ConferenceStatus source

Returns the current status of the conference

public getStatus$(): Observable<ConferenceStatus> source

Returns an observable for the status of the conference

public hasRemoteVideo(): boolean source

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

Return:

boolean

public async hold(): Promise source

Local hold Stop publishing and subscribing to the media in the conference

Return:

Promise

resolved on success

public async inviteMany(participants: InviteParticipants, session: String, mediaTypes: MediaTypes, autoAccepted: boolean, resolve: boolean, context: object): Promise<Object[]> source

Invites many participants to a conference.

Params:

NameTypeAttributeDescription
participants InviteParticipants
session String
  • optional
mediaTypes MediaTypes
  • optional

the MediaTypes for this invitation

autoAccepted boolean
  • optional
  • default: false
resolve boolean
  • optional
  • default: true

indicates if participant address should be resolved to an user gatewayUsername.

context object
  • optional

Arbitrary context that can be sent when making an invite

Return:

Promise<Object[]>

A promise with an array of invitation objects

Return Properties:

NameTypeAttributeDescription
waitUntilResolve Promise<Object>

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)

public async inviteParticipant(participant: String, session: String, mediaTypes: MediaTypes, autoAccepted: boolean, requestId: string, resolve: boolean, context: object): Promise<Object> source

Invites a new participant to this conference

Params:

NameTypeAttributeDescription
participant String
session String
  • optional
mediaTypes MediaTypes
  • optional

the MediaTypes of this invitation

autoAccepted boolean
  • optional
  • default: false
requestId string
  • optional

the ID of the request that generated this invitation.

resolve boolean
  • optional
  • default: true

indicates if participant address should be resolved to an user gatewayUsername.

context object
  • optional

Arbitrary context that can be sent when making an invite

Return:

Promise<Object>

A promise with an object with two properties: SIP code and whoAccepted the invite

Return Properties:

NameTypeAttributeDescription
code number

SIP code of the response

whoAccepted string

User id of the participant that accepted the invite

Throw:

Error

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

public inviteParticipants(participants: string[]): Promise source

Invites a list of new participant to this conference

Params:

NameTypeAttributeDescription
participants string[]

Return:

Promise

public isBeingTransfered(): boolean source

Check if a conference is being transfering

Return:

boolean

public isRecovered(): boolean source

Return:

boolean

public async join(): Promise source

Connects to the conference

Return:

Promise

public async leave(errorCode: number): Promise source

Leaves the conference

Params:

NameTypeAttributeDescription
errorCode number

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

Return:

Promise

public sendDtmf(value: string): Promise<undefined, Error source

Send data to the audio's room

Params:

NameTypeAttributeDescription
value string

Return:

Promise<undefined, Error

public unattendedCallTransfer(participant: string, mediaTypes: MediaTypes): Promise source

Create an unattendedCallTransfer towards a user in the system

Params:

NameTypeAttributeDescription
participant string
mediaTypes MediaTypes
  • optional

the current media types will be used if nothing is specified

Return:

Promise

public unhold(): Promise source

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

Return:

Promise

resolved on success

public updateMedia(audio: *, video: *, screen: *): * source

Params:

NameTypeAttributeDescription
audio *
video *
screen *

Return:

*

public updateOutgoingInvitationsForParticipants(gatewayUsernames: *, mediaTypes: *, autoAccepted: *) source

Params:

NameTypeAttributeDescription
gatewayUsernames *
mediaTypes *
autoAccepted *

public updateOutgoingResolvedInvitationsForParticipant(participant: *, resolvedInvite: *) source

Params:

NameTypeAttributeDescription
participant *
resolvedInvite *