The callstats Developer Hub

Welcome to the callstats developer hub. You'll find comprehensive guides and documentation to help you start working with callstats as quickly as possible, as well as support if you get stuck. Let's jump right in!

Guides    API Reference

Steps to integrate the Ingest REST API

All the messages between the WebRTC endpoint and the Ingest REST API during the call are shown in the following figures, represented as sequence diagrams.

Step 0

Before the webRTC endpoint initiates authentication procedure with infrastructure, it must obtain a signed token provided by its own Authentication API. Please refer to Step 1 and Step 2 within this document.

Step 1

At the beginning of the call, the service needs to be authenticated. When the authentication succeeds, a 'token' is sent back to the WebRTC endpoint. The received 'token' is then used for sending events and stats.


After the authentication process is completed, the endpoint initiates the monitoring process by a sending userJoined event along with the newly acquired 'token'. In case of success the response contains ucID. By acquiring ucID and 'token' the endpoint allowed to send events and stats.

Step 2

Throughout the duration of the call the WebRTC endpoint is obligated to send userAlive event in every 10 seconds. For initiating the call the endpoint requires to send fabricSetup event.


Step 3

Whenever a new media stream track appears, for example a new participant joins or a new media source is added, the SSRC map event MUST be sent. The newly added SSRC should be appended to the SSRC map rather than replacing the old SSRC


Step 4

WebRTC endpoint can now send stats to REST API regularly and all the stats messages are acknowledged.


Step 5

The WebRTC endpoint informs the REST API about the end of the call by sending fabricTermination event. After the event is acknowledged, the endpoint sends the userLeft event, which removes the user from the conference. Once the last participant sends the userLeft event, the conference is terminated.


Updated about a year ago

Steps to integrate the Ingest REST API

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.