Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Debug Data & Call Quality Analysis
When calls have quality issues, the Telnyx WebRTC JS SDK provides multiple tools to diagnose the problem. This guide covers collecting debug data, interpreting results, and common troubleshooting patterns.Data Collection Methods
| Method | When to Use | Data Available |
|---|---|---|
| Call Reports | Production monitoring | RTT, jitter, packet loss, ICE state, audio levels |
| Debug Reports | Deep troubleshooting | Full WebRTC stats, SDP, ICE candidates, timestamps |
| Console Debug | Development | SDK internal logs, WebSocket messages |
| Debug Visualizer | Visual analysis | Charts of call quality over time |
Method 1: Call Reports (Production)
Enable call reports for production quality monitoring:Method 2: Debug Reports (Deep Troubleshooting)
Enable debug output for detailed troubleshooting data. Usedebug: true with debugOutput to control where the data goes:
- Full ICE candidate list with timestamps
- DTLS handshake state
- SDP offer/answer with codec negotiation
- Packet-level stats (bytes, packets, loss per direction)
- Audio level measurements
Accessing debug data
Call report data is available via the Call Report Stats API after the call ends:Interpreting debug data
Key sections to check:| Section | What to Look For |
|---|---|
ice_data.transport | DTLS state, ICE state, SRTP cipher |
ice_data.selected_pair | Which candidate pair is in use (host/srflx/relay) |
ice_data.candidates | All gathered candidates with timestamps |
segments | Periodic RTT, jitter, packet loss measurements |
Method 3: Console Debug (Development)
Enabledebug: true to get verbose SDK logging in the browser console:
debug: true enables console logging by default.
Method 4: Debug Visualizer
Send debug output to the Telnyx debug visualizer for graphical analysis:- Call timeline with state transitions
- ICE candidate gathering progress
- DTLS handshake status
- Audio quality graphs (RTT, jitter, packet loss)
- Media flow direction
Common Issues & Diagnosis
One-Way Audio
Check:- Is DTLS connected? →
ice_data.transport.dtls_state === "connected" - Is audio being sent? → Check
bytesSentin stats - Is audio being received? → Check
bytesReceivedin stats - Which candidate type? →
ice_data.selected_pairshows host/srflx/relay
- Asymmetric TURN relay (two nominated candidate pairs, one sending and one receiving)
- Firewall blocks media in one direction
- VPN interferes with ICE candidates
Call Doesn’t Connect
Check:- WebSocket state →
client.connection.connected - ICE state →
ice_data.transport.ice_state - STUN accessibility → Any
srflxcandidates?
- Firewall blocks
rtc.telnyx.com:443(signaling) - Firewall blocks
stun.telnyx.com:3478(STUN) - Firewall blocks
turn.telnyx.com:443(TURN) - No
relaycandidates and symmetric NAT
Choppy Audio
Check:- Jitter →
stats.jitter > 50msis poor - Packet loss →
stats.packetLoss > 3%is poor - RTT →
stats.rtt > 300msis poor
- WiFi congestion (high jitter)
- Network congestion (high packet loss)
- Long routing path (high RTT)
- VPN adding latency
Echo
Common causes:- Built-in speakers + mic without echo cancellation
- Two audio elements playing the same stream
- Headset echo cancellation not working
- Recommend headphones
- Ensure only one audio element is active per call
- Check browser echo cancellation settings
Quick Diagnostic Script
Run this in the browser console during a problematic call:See Also
- Call Report Stats — Full stats API reference
- Error Handling — Error and warning codes
- Network Requirements — Firewall and connectivity
- IClientOptions —
debug,debugOutput - Best Practices — Quality monitoring