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:
| Callback | Description |
|---|---|
onNetworkQuality | Reports uplink and downlink last-mile network quality. |
onRtcStats | Reports real-time interaction statistics. |
onLocalAudioStats | Reports statistics for the sent audio stream. |
onLocalAudioStateChanged | Reports local audio stream state changes. |
onRemoteAudioStats | Reports statistics for the received remote audio stream. |
onRemoteAudioStateChanged | Reports remote audio stream state changes. |
For Web SDK, use the following event and methods:
| Event or method | Description |
|---|---|
network-quality | Reports uplink and downlink last-mile network quality. |
getRTCStats | Gets real-time interaction statistics. |
getLocalAudioStats | Gets statistics for the sent audio stream. |
getRemoteAudioStats | Gets statistics for the received remote audio stream. |
Reference
Network quality score
| Value | Description |
|---|---|
0 | The network quality is unknown. |
1 | The network quality is excellent. |
2 | The network quality is good, but the bitrate may be slightly lower than excellent. |
3 | Users may experience a slight decrease in call quality. |
4 | The network quality is poor, and users may be unable to make smooth calls. |
5 | The network quality is extremely poor, making it almost impossible for users to make calls. |
6 | The network is down, and the user cannot make a call. |
