# RTP SSRC冲突检测到：重复的SSRC 0x%08X

- **ID:** `communication/rtp-ssrc-collision`
- **领域:** communication
- **类别:** protocol_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

同一RTP会话中的两个端点使用了相同的同步源标识符，导致数据包错误路由。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| libWebRTC M120 | active | — | — |
| PJSIP 2.13.1 | active | — | — |
| FFmpeg 6.1 | active | — | — |

## 解决方案

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)
   ```
2. ```
   Enable SSRC collision detection and handling in your RTP stack (e.g., in PJSIP set pjsua_media_config.rtp_collision_detection=1)
   ```

## 无效尝试

- **Restart all RTP streams simultaneously** — Collision may reoccur if SSRCs are generated from the same seed or algorithm without randomization. (60% 失败率)
- **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% 失败率)
