# RTP SSRC collision detected: duplicate SSRC 0x%08X

- **ID:** `communication/rtp-ssrc-collision`
- **Domain:** communication
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two RTP endpoints in the same session are using the same synchronization source identifier, causing packet misrouting.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| libWebRTC M120 | active | — | — |
| PJSIP 2.13.1 | active | — | — |
| FFmpeg 6.1 | active | — | — |

## Workarounds

1. **Implement RTCP BYE and re-invite with new random SSRC. Example in Python: import random; new_ssrc = random.randint(0, 0xFFFFFFFF); send_rtcp_bye(old_ssrc); start_rtp(new_ssrc)** (85% success)
   ```
   Implement RTCP BYE and re-invite with new random SSRC. Example in Python: import random; new_ssrc = random.randint(0, 0xFFFFFFFF); send_rtcp_bye(old_ssrc); start_rtp(new_ssrc)
   ```
2. **Enable SSRC collision detection and handling in your RTP stack (e.g., in PJSIP set pjsua_media_config.rtp_collision_detection=1)** (90% success)
   ```
   Enable SSRC collision detection and handling in your RTP stack (e.g., in PJSIP set pjsua_media_config.rtp_collision_detection=1)
   ```

## Dead Ends

- **Restart all RTP streams simultaneously** — Collision may reoccur if SSRCs are generated from the same seed or algorithm without randomization. (60% fail)
- **Increase SSRC pool size or use fixed SSRCs** — Fixed SSRCs can cause permanent collisions in multi-party calls; randomization is required by RFC 3550. (80% fail)
