414 communication protocol_error ai_generated true

SIP/2.0 414 Request-URI Too Long on INVITE

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

Also available as: JSON · Markdown · 中文
78%Fix Rate
85%Confidence
1Evidence
2024-03-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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

Root Cause

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

中文

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

Official Documentation

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

Workarounds

  1. 80% success Increase the max URI length in Kamailio: edit kamailio.cfg, add 'modparam("sl", "max_uri_len", 4096)' and reload configuration.
    Increase the max URI length in Kamailio: edit kamailio.cfg, add 'modparam("sl", "max_uri_len", 4096)' and reload configuration.
  2. 75% success 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.
    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. 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.

Dead Ends

Common approaches that don't work:

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

    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% fail

    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% fail

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