Irish technology company Spearline acquires Callstats from 8x8.  Learn More

Product Update: WebRTC Smart Connectivity Test Measures Network Quality

By callstats on February 23, 2018

Whether your app is using WebRTC to enable remote collaboration or to connect healthcare professionals with their patients, the user experience should be seamless.

Media quality is affected by a number of factors, but is especially susceptible to end-user network environments. Understanding the network conditions for WebRTC calls can ensure higher media quality and predictability. To tackle this issue, we launched a new feature called the Smart Connectivity Test.

The Smart Connectivity Test API

Our Javascript library (callstats.js) runs WebRTC-specific tests to measure the network quality of end users before an actual call or conference begins. It measures the status of the media connectivity, round-trip time (RTT), fraction losses, and throughput available to end-user devices. TheSmart Connectivity Test is run against TURN servers using WebRTC data channels.

You can access the Smart Connectivity Test results using our “on” function, as shown below:

callstats.on("preCallTestResults", csPreCallTestResultsCallback);
function preCallTestResultsCallback(status, results) {
    //Check the status if (status == callstats.callStatsAPIReturnStatus.success) {
        var connectivity = results.mediaConnectivity;
        var rtt = results.rtt;
        var loss = results.fractionalLoss;
        var throughput = results.throughput;
    else {
        console.log("Pre-call test could not be run");


App developers can use “status” to check if the Smart Connectivity Test has completed. The test will return success or failure upon completion and will run as long as the callback is not fired. The pre-call test might return partial results if the tests are interrupted or if the call begins while theSmart Connectivity Test is running. You can disable the Smart Connectivity Test by setting “disablePrecalltest” to true in configParams.

Please note that callstats.js should be initialized during the page load or early enough for the pre-call test to be completed before the call or conference begins.

Results On The Dashboard

WebRTC Pre-Call Network Test Dashboard

The results of the Smart Connectivity Test are available for each participant under the “More Information” section of the participants table in the conference view. To avoid a poor user experience, it is highly recommended that operators expose these network diagnostics results to end users. This informs end users so they may switch to a better network before starting a call or conference, and updates application developers so they may apply optimal configuration to the application.

Network Test Page

The Smart Connectivity Test is also publicly available at

WebRTC Pre-Call Network Test Webpage

Let us know what you think about this new feature. Please send your feedback to support[at]

Tags: WebRTC,, WebRTC Monitoring, Smart Connectivity Test