Skip to content

TEL-1411: keep SIP dispatch room names within the room name limit - #2037

Open
hechen-eng wants to merge 2 commits into
mainfrom
room-name-limit
Open

hechen-eng wants to merge 2 commits into
mainfrom
room-name-limit

Conversation

@hechen-eng

@hechen-eng hechen-eng commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The individual and callee dispatch rules build the room name from the phone number of the call. The user part of a SIP URI has no length limit, and some carriers put long data in it. With a number of about 200 characters, the room name is longer than the server limit of 256 bytes. The room join is then rejected and the inbound call fails.

Change

EvaluateDispatchRule keeps the room name within the limit. When the number does not fit, it is cut and a hash of the full number is added, so two long numbers still get different rooms and the same number gets the same room. The prefix and the random suffix do not change, and a number that fits gives the same room name as before.

The limit is 256 bytes by default, the default of the server config. A caller that knows the real limit can pass it with the new option WithMaxRoomNameLength; zero means no limit, as in the server config.

The individual and callee dispatch rules build the room name from the
phone number. The user part of a SIP URI has no length limit, so a long
value made a room name that the server rejects, and the call failed.

Cut a long number and add a hash of the full value, so that the room
name stays unique and within the limit.
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

This PR bumps

  • github.com/livekit/protocol: patch

Also bumped

  • @livekit/protocol: fixed with github.com/livekit/protocol

The server reads its room name limit from the config. A caller that
knows the limit can pass it; the default stays the default of the server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant