31931: Stream - Media - Media Discarded
VOICE
WARNING
Twilio sends this warning once per Stream when audio sent to a bidirectional Media Stream is discarded because the downstream buffer has overflowed. Twilio buffers outbound media messages and plays them in the order received. If buffered audio grows beyond 10 minutes, Twilio stops accepting more audio for that Stream.
- Your WebSocket server sent
mediamessages faster than Twilio could play them back on the Call. - More than 10 minutes of audio was buffered for the Stream. After that limit is reached, no more audio is accepted.
- Your application kept queueing audio without tracking playback completion with
markmessages.
- Send audio only on bidirectional Streams created with
<Connect><Stream>. If you only need to receive audio, use a unidirectional Stream instead of sendingmediaback to Twilio. - Pace outbound
mediamessages so the buffer can drain before you send more audio. - Send a
markmessage after eachmediamessage and wait for the matchingmarkevent before sending large amounts of additional audio. - If you need to interrupt queued audio, send a
clearmessage to empty the buffer before sending replacement audio.