414 communication protocol_error ai_generated true

SIP/2.0 414 请求URI过长(INVITE请求)

SIP/2.0 414 Request-URI Too Long on INVITE

ID: communication/sip-request-uri-too-long

其他格式: JSON · Markdown 中文 · English
78%修复率
85%置信度
1证据数
2024-03-12首次发现

版本兼容性

版本状态引入弃用备注
Asterisk 18.15.0 active
FreeSWITCH 1.10.9 active
Kamailio 5.6.0 active
OpenSIPS 3.4.0 active
Cisco Unified CM 14.0 active

根因分析

SIP INVITE请求URI超过了SIP代理或注册器中配置的最大允许长度(通常为2048字节),通常是由于电话号码过长、URI参数过多或报头格式错误所致。

English

SIP INVITE request URI exceeds the maximum allowed length (typically 2048 bytes) configured in the SIP proxy or registrar, often due to long phone numbers, excessive URI parameters, or malformed headers.

generic

官方文档

https://www.rfc-editor.org/rfc/rfc3261#section-21.4.14

解决方案

  1. Increase the max URI length in Kamailio: edit kamailio.cfg, add 'modparam("sl", "max_uri_len", 4096)' and reload configuration.
  2. Shorten the SIP URI by removing unnecessary URI parameters (e.g., user=phone, transport=tcp) in the dial plan or using a URI normalization function.

无效尝试

常见但无效的做法:

  1. Disable SIP URI length check entirely in config 95% 失败

    Disabling the length check exposes the server to denial-of-service attacks via extremely long URIs and may violate SIP standards.

  2. Increase TCP buffer size on the SIP proxy 90% 失败

    TCP buffer size does not affect the SIP URI length limit, which is enforced at the application layer by the SIP stack.

  3. Restart the SIP service to clear the error 85% 失败

    Restarting only resets the connection state; the URI length violation reoccurs on the next INVITE with the same URI.