Repository navigation
TEL-1411: keep SIP dispatch room names within the room name limit - #2037
Open
hechen-eng wants to merge 2 commits into
Open
hechen-eng wants to merge 2 commits into
hechen-eng wants to merge 2 commits into
Conversation
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.
Contributor
|
This PR bumps
Also bumped
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
EvaluateDispatchRulekeeps 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.