Best Practices for Call Quality — Browser SDK

VoIP call quality is influenced by several factors, including device software and hardware and the network a device is connected to. Here we explore the key factors that influence call quality on Browser SDK calls, and offers recommendations for improving call quality.

Network Characteristics

The network the device runs on has a big influence on call quality thanks to factors such as jitter and latency.

Jitter and Latency

VoIP calls involve the transmission of a continuous train of voice data packets. If the network is congested, some of the first packets sent may reach a recipient later than other packets. This out-of-order receipt of packets, known as jitter, can result in the audio sounding jumbled or robotic. Jitter is measured in milliseconds of delay, and jitter values higher than 30 milliseconds on WebRTC calls can lead to poor audio quality. High network congestion can also lead to packet loss, resulting in chunks of audio never reaching the intended recipient.

Latency, in the context of VoIP calls, is the spoken-to-heard delay in the transmission of audio. The major contributing factor to VoIP latency is the delay incurred in the transmission of voice packets from origin to destination. When this network latency is more than 300 milliseconds of round-trip time, call participants can experience audio lag.

Plivo Recommends

To minimize network and device issues and improve call quality, Plivo recommends:

  • Using a high-bandwidth fiber connection from a reputed internet provider. Dedicated business internet connections generally come with guaranteed SLAs on bandwidth and latency.
  • Using a physical Ethernet connection instead of Wi-Fi when possible.
  • If using Wi-Fi, limiting the number of devices connected on the same channel.
  • Using high-quality Wi-Fi routers built for enterprises or real-time gaming. Look for routers that come with advanced QoS features.
  • Auditing your network firewall and NAT settings to check for transmission delays due to improper configuration.
  • Avoiding large data transfers on the Wi-Fi network during calls.
  • Limiting bandwidth per connected device to ensure an even allocation of total available bandwidth.
  • Avoiding calls over cellular data connections (4G and older) as they are not optimized for low-latency traffic.
  • Setting the Differentiated Service Code Point (dscp) parameter of Plivo Browser SDK to “true.” DSCP for WebRTC is supported by Chrome only. It informs network routers to prioritize voice packets over other network packets. Corresponding QoS configurations in the router may be also required.
  • Setting Plivo Media Server region selection in auto mode of the Browser SDK. This ensures that calls get routed through the closest geographic PoP based on the device’s IP address.
  • Ensuring uplink and downlink bandwidth availability of at least 50Kbps for voice transmission.
  • If operating in a low-bandwidth environment, capping the bandwidth to be consumed on the call using the maxAverageBitrate configuration parameter of the Browser SDK.
  • Gracefully handling poor call quality experiences in real time by consuming MediaMetrics call quality events emitted by the Browser SDK during the call.
  • Submitting call quality feedback to Plivo programmatically from the Browser SDK or through the Feedback API. Your feedback lets Plivo optimize its network by identifying patterns across calls.

Network Firewalls

Voice data on VoIP calls is transferred over UDP. Ensure that your network firewall allows the transmission of UDP packets between client devices and the public internet.

If your firewall requires whitelisting of external IP addresses, make sure to whitelist Plivo’s SIP Signaling and Media Server IP addresses.

Device Characteristics

Certain software and hardware device characteristics have a direct impact on VoIP call quality.

Browser and OS

The Plivo Browser SDK is tested and supported only for these browsers. Browser SDK uses WebRTC for voice calls on these browsers:

  • Chrome on Windows, Linux, macOS, and Android
  • Firefox on Windows, Linux, macOS, and Android
  • Safari 11+ on iOS and macOS
  • New Microsoft Edge (based on Chromium) on Windows

Chrome for iOS and Firefox for iOS don’t support WebRTC.

Plivo highly recommends using our native iOS and Android SDKs to build app-based calling functionality on mobile devices. Mobile browsers would be required to be in the foreground for the entire duration of a call and lack call interruption handling for cellular calls received while on a browser call. Both these features are supported through the Plivo iOS and Android SDKs.

Device Hardware

While most modern PC and smartphone devices are more than capable of handling VoIP calls, incompatibilities between hardware components such as network drivers, audio cards, and other firmware components can result in unexpected issues with media handling.

Attempting to reproduce issues on other devices should be a key step in your debugging process.

The Audio Input and Output Device

Plivo recommends using quality headsets for browser-based calls.

Headsets minimize echo by providing acoustic isolation between the speaker and the microphone. High-quality VoIP headsets with noise-canceling features can greatly enhance call quality in noisy environments by eliminating background sounds.

Wired headsets generally offer more stable sound quality than wireless or Bluetooth headsets. Wireless headsets are more prone to adapter and driver configuration issues, which can lead to static or white noise on calls. We recommend testing with a different headset, or with a built-in mic and speaker, when troubleshooting audio quality issues.