# SIP/2.0 403 禁止注册请求

- **ID:** `communication/sip-403-forbidden-registration`
- **领域:** communication
- **类别:** auth_error
- **错误码:** `403`
- **验证级别:** ai_generated
- **修复率:** 75%

## 根因

SIP服务器因凭据不匹配、nonce过时或基于IP的访问控制而拒绝注册。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| RFC 3261 | active | — | — |
| Kamailio 5.6 | active | — | — |
| Asterisk 20 | active | — | — |
| FreeSWITCH 1.10 | active | — | — |

## 解决方案

1. ```
   Regenerate the SIP digest credentials: delete the stored nonce and password hash on the client, then force a fresh REGISTER with the correct username and password. On Linphone, remove the account and re-add it. On a custom client, clear the cached credentials and call sip_register() again.
   ```
2. ```
   Verify the SIP server's IP access control list (ACL). On Kamailio, check 'allow_trusted' and 'allow_source_address' settings. Add the client's public IP to the trusted list if needed.
   ```

## 无效尝试

- **Re-enter the same SIP username and password in the client settings** — Credentials may be correct but the nonce (challenge) is stale or the server requires digest authentication re-challenge (60% 失败率)
- **Disable SIP ALG in the router to bypass firewall issues** — 403 is not a network traversal error; it's an authentication/authorization failure at the application layer (80% 失败率)
- **Change the SIP transport from UDP to TCP** — Transport protocol does not affect authentication validity; the 403 is generated after the transport handshake succeeds (90% 失败率)
