RTC or Browser Connection Failure
When WHIP/WHEP returns success, it only indicates that the signaling exchange is complete; the media must still be established via ICE. Perform checks across six layers: security context, session, SDP, ICE, media, and cleanup.
flowchart LR
A[HTTPS and permission] --> B[Room and participant]
B --> C[WHIP/WHEP SDP]
C --> D[ICE / TURN]
D --> E[Real media]
E --> F[Leave and resource release]
1. Browser Security Context
- The page uses valid HTTPS, and the domain matches the certificate.
- The browser has been granted camera/microphone permissions.
- There is no mixed content or device access blocked by enterprise policies.
- Check the Console, Network tab, and
webrtc-internals.
2. Rooms and Members
- The Room exists and has not reached capacity.
- Participant identity, role, and heartbeat are valid.
- Publish/Subscribe targets are correct.
- No residual old sessions for the same participant exist after a page refresh.
3. WHIP/WHEP and SDP
The request/response Content-Type should be application/sdp. Confirm the following in the Offer/Answer:
- Audio/video m-lines are not unexpectedly rejected;
- Codecs have a common intersection between both parties;
- Direction matches the publish or subscribe intent;
- Fingerprint and DTLS are functioning normally;
- Candidates are not corrupted by proxies or serialization;
- Location/ETag and session IDs are saved.
4. ICE and Network
Observe the ICE gathering, checking, connected/failed states, and the selected candidate pair:
- Success on LAN, failure on WAN: Check external IP, NAT mapping, and STUN.
- Symmetric NAT failure: Deploy and verify TURN relay.
- UDP disabled failure: Provide TCP/TLS TURN.
- Multiple NICs: Remove or lower the priority of unreachable candidates.
- TURN authentication failure: Check temporary credential validity, clock synchronization, and realm.
HTTPS reverse proxies cannot forward all ICE media ports.
5. Connected but No Media
- Check if the publish track is actually sending and if the browser is muted.
- Verify if codec, resolution, bitrate, and direction are negotiated.
- Verify if the MediaServer has established the corresponding MediaSession and stream.
- Verify if the subscription topology points to the correct publisher.
- If there is video but no audio, check audio permissions, m-lines, and codecs.
6. Reconnection and Release
Media sessions should be released after the page is closed, a member leaves, or a timeout occurs. Before reconnecting, query the old session, release it based on the actual server-side identifier, and then create a new session. Continuously increasing ReleaseFailed/Unreleasable counts must trigger an alert.
Submitting Failure Evidence
Provide the browser and version, network type, Room/Member/Session IDs, sanitized summaries of Offer/Answer, ICE state, selected candidate type, MediaServer logs, and the time of failure. Do not submit long-term TURN secrets or full login credentials.
Recovery Criteria
Successfully complete publishing, subscribing, network disconnection reconnection, and leave-cleanup in both LAN and target WAN environments; multiple consecutive refreshes must not produce duplicate members or leaked sessions.