In-call quality monitoring

Updated

Monitor network and audio quality during a Voice Calling session.

During a call, Voice SDK triggers callbacks and exposes statistics related to voice calling quality. Use these signals to monitor user experience, troubleshoot audio issues, and adjust your app when network conditions change.

Understand the tech

After a user joins a channel, Voice SDK reports information such as uplink and downlink network quality, real-time interaction statistics, and statistics for local and remote audio streams.

To monitor call quality, Agora provides the following notifications and statistics:

Network quality

The network quality callback provides insight into the uplink and downlink last-mile network quality for each participant in the channel. Last mile refers to the network from your device to Agora servers. Network quality scores are calculated based on factors such as bitrate, packet loss rate, round-trip delay, and network jitter.

Interaction statistics

The statistics callback reports key metrics such as call duration, the number of participants, system CPU usage, and app CPU usage.

Audio quality

Audio quality callbacks and statistics cover both local and remote audio streams. You can monitor bitrate, delay, packet loss, and audio state changes to understand voice quality and diagnose call issues.

Prerequisites

Ensure that you have implemented the SDK quickstart in your project.

Implement in-call quality monitoring

For native SDKs, implement the following real-time interaction quality statistics callbacks and audio state monitoring callbacks:

CallbackDescription
onNetworkQualityReports uplink and downlink last-mile network quality.
onRtcStatsReports real-time interaction statistics.
onLocalAudioStatsReports statistics for the sent audio stream.
onLocalAudioStateChangedReports local audio stream state changes.
onRemoteAudioStatsReports statistics for the received remote audio stream.
onRemoteAudioStateChangedReports remote audio stream state changes.

For Web SDK, use the following event and methods:

Event or methodDescription
network-qualityReports uplink and downlink last-mile network quality.
getRTCStatsGets real-time interaction statistics.
getLocalAudioStatsGets statistics for the sent audio stream.
getRemoteAudioStatsGets statistics for the received remote audio stream.

Reference

Network quality score

ValueDescription
0The network quality is unknown.
1The network quality is excellent.
2The network quality is good, but the bitrate may be slightly lower than excellent.
3Users may experience a slight decrease in call quality.
4The network quality is poor, and users may be unable to make smooth calls.
5The network quality is extremely poor, making it almost impossible for users to make calls.
6The network is down, and the user cannot make a call.

API reference