QoS Considerations for Twilio
Twilio uses WebRTC, which runs over the Internet and doesn't honor the traditional Differentiated Services Code Point (DSCP)/Type of Service (TOS) byte prioritization required for Quality of Service (QoS). When private networking is involved, DSCP/TOS byte prioritization should be available, as it would be with any RTP payload.
WebRTC prioritization is not a major concern for Mean Opinion Score (MOS). It only becomes a concern when the Internet pipe is saturated or unmanaged to the point where traffic struggles to get through. In that case, better policy enforcement (to restrict best effort, non-RTP traffic) is the best approach.
To achieve QoS over the internet, we recommend the following:
- Use standard Real-Time Transport Protocol (RTP) to route WebRTC audio payloads.
- Prioritize outbound RTP packets going to Twilio.
- Set network policy enforcement tools on the firewall to ensure that inbound RTP traffic is allocated sufficient bandwidth to run. For example, you can restrict available bandwidth to inbound non-RTP traffic so that inbound RTP traffic has enough bandwidth.
For more information about destination IPs and ports required for QoS prioritization, see QoS Considerations for Twilio.