Working with conference rooms

Developers can manage directly the conference rooms to implement the requested use cases via the QSS functionalities. This section explain the main actions that are available to the developers to interact with the conference rooms and the actual messages sent into the wire to ease the troubleshooting.

Creating a conference room

This is usually the very first step when we want to setup a communication between two or more users. Any of the users will need to create a conference room by using the QSS.rooms service. For example in the Javascript SDK, this is done using the conferenceManager.createConference() method. This is the actual JSON message that is sent from the client application to the QSS. Both the request and requestID parameters are created automatically by the SDKs, so you don’t need to give it a value.

1 "request":"createRoom",
2 "requestID":"zoyhQtp_rbHP_u7TX58GN",
3 "payload":{}

Note

The “requestID” parameter can be used to track and identify the answers to a specific query, as it is the same during each single transaction.

Once the QSS process the message and sets up the conference room, it sends backs a confirmation message to the client application:

 1"id":"60315b4fe951a9c42cae6e0f",
 2"uuid":"2f11c52047f244f78e1deac1839fbd45d008d20f6eabcf2e17ede0b5d3d520e9",
 3"owner":"",
 4"record":false,
 5"number":"26777033",
 6"sipUri":"sip:88826777033@audiomixer-sfu1:5080",
 7"bitrate":1024,
 8"serverUuid":"RQQVnaPf9ZQtiL2sDDZf5aoZ1gBTUagW6AcIRVG47jyEpl80nKkBMG0be0VmROmf",
 9"server":{
10     "https":"wss://collaborator.quobis.com/sfu1/socket.io",
11     "wss":"wss://collaborator.quobis.com/ws-sfu1"
12  },
13"timestamp":1613847375280,
14"participantsLimit":100,
15"ice":[{
16    "urls":"stun:stun.l.google.com:19302"}],
17    "room":"2f11c52047f244f78e1deac1839fbd45d008d20f6eabcf2e17ede0b5d3d520e9",
18    "token":"51e4bed51919fe9d4b06a8828c88c19f",
19    "participants":["5da6e65772aa8c46876107d6"]
20 },
21"answer":"createRoom"
22}

Let’s explain each field in detail:

CreateRoom message fields

Field

Description

id

ID of this QSS invite

uuid

Unique identifier for the conference room

owner

User ID of the owner of the conference room

record

(boolean) Indicates whether the conference is going to be recorded or not

number

Internal ID used by the wrapper service

sipUri

Address of the audiomixer confbridge

bitrate

Maximum allowable bitrate per user

serveruuid

UUID of the server

server

Array containing the HTTPS and the WSS address of the wrapper service

timestamp

UTC, UNIX time in milliseconds of the conference room hour and date

participantsLimit

Max number of concurrent participants allowed in the conference.

ice

Array of ICE servers according to the standard format
  • urls

  • room

  • token

  • participants: list of room participants

answer

Value of the answer (createRoom if successful)

Destroying a conference room

Please note that, generally speaking, conference rooms do not have a time to live parameter which means that they remain in the system forever unless they are explicitly destroyed. It’s up to the developer to make sure that unused conference rooms are destroyed.

Joining a conference room

Once a conference room exists, participants can join it as long as they are in the conference room Access Control List. In case they are not in the ACL, they SDK will thrown an error. For example in the Javascript SDK, this is done using the conference.join() method

Leaving a conference room

A participant in a conference room can leave it at anytime. That is achieved by sending a leaveRoom message to the QSS along with the conference room ID. That message must include the code error number, which is the value of the SIP error code indicating the cause of leaving (“200” is the default valuee). This is done for example in the Javascript SDK with the method conference.leave().

Note

Please note that leaving a conference room does not mean anything for the remaining participant(s), even when there is only one participant left. The conference room exists until it’s destroyed.

This is the actual message that is sent from the client application to the QSS:

1data:
2  "{
3     "request":"leaveRoom",
4     "requestID":"w_RH7mzOLKuebei4ylSO9",
5     "payload":{"room":"6d3fa58b1ecfdffd621a3a4e7fbc26d284b6c5e8c8098a0099fa90d95dd86f9a"}
6  }"

The message sent back from the QSS to the client application is as follows:

1data:
2  "{
3      "requestID":"w_RH7mzOLKuebei4ylSO9",
4      "cancel":"leaveRoom",
5      "error":403,
6      "message":"user not included into ACL"
7   }"

In case that we try to leave a conference room in where we are not part of the ACL, the following message will be received:

1data:
2  "{
3      "requestID":"w_RH7mzOLKuebei4ylSO9",
4      "cancel":"leaveRoom",
5      "error":403,
6      "message":"user not included into ACL"
7   }"

Adding an user to a conference room

As explained above, a user who wants to join a conference room and knows its ID can request to join it. In case that the user does not have the conference room ID, it can also be invited to join a conference room by using the QSS.invites service. This functionality is also used when implementing a basic call scenario where a user wants to call another one, as explained in section “Basic one to one calls”.

Transfer an user to another conference room

Conference room events

There are a number of events available to the developers to notify about changes occurred in the conference room.

Conference room events

remoteStreams

Emitted every time remoteStreams changes

outgoingInvitations

Emitted every a outgoingInvitation changes

expelled

Emitted when we are expelled from the conference

destroyed

Emitted when the conference is destroyed

status

Emitted every time the conference status changes

remoteParticipants

Emitted every time the participants list changes

transferError

Emitted when an error occurs in a transfer

participantAdded

Emitted when a new participant joins the conference

participantRemoved

Emitted when a participant leaves the conference

participantHold

Emitted when a participant starts holding the call

participantUnhold

Emitted when a participant stops holding the call

localStreamAdded

Emitted on a new local stream

localStreamRemoved

Emitted on local stream removed

remoteStreamAdded

Emitted on remote stream added

remoteStreamRemove

Emitted on remote stream removed

The QSS offers also other functionalities for common use cases such as one to one calls, meetings or quick conferences.

Note

If you are already familiar with our product, you can skip this section and jump right into development section by checking the quick start guides and tutorials: