WebSocket Connection Issues
Connection Fails to Establish
Connection Drops Mid-Call
Audio Quality Issues
No Audio Received
- Verify
audioTracksetting - Ensure it’s set tobothorinboundin your Stream XML - Check WebSocket handler - Confirm your
onMediahandler is registered before callingstart() - Verify call is connected - The
startevent should fire before anymediaevents
No Audio Playback to Caller
- Verify bidirectional mode - Ensure
bidirectional="true"in your Stream XML - Check content type match - The
contentTypeandsampleRatein yourplayAudiomessage must match your Stream XML settings - Verify audio format - Send raw audio data only (no WAV headers)
Distorted or Garbled Audio
Performance Issues
High Latency
Slow Response Times
- Use μ-law 8kHz - Native telephony format requires no transcoding
- Deploy regionally - Place your WebSocket server near your caller locations
- Stream audio - Send TTS audio as it’s generated, don’t wait for completion
- Connection pooling - Reuse AI service connections
Status Callback Events
Monitor yourstatusCallbackUrl for stream lifecycle events:
DroppedStream Reasons
- WebSocket connection failed during initiation
- WebSocket connection terminated during streaming
- WebSocket connection terminated due to slow connection
Debug Logs
Access audio stream logs in the Plivo Console:- Go to Voice → Logs → Calls
- Click on the call to view details
- Find the Audio Streams section with:
- Stream UUID
- Start/end times
- Duration and billing
- Hangup reason
- Debug logs link
Sample Debug Log
Common Error Messages
Related
- Audio Streaming Guide - Complete streaming documentation
- Best Practices - Debug logs and monitoring
- Stream Event Protocol - WebSocket message reference