fix: accept sips: URIs when extracting caller info - #241
Open
darwvin-dev wants to merge 1 commit into
Open
Conversation
The two remote-URI patterns required a literal "sip:". The string "sips:" does not contain "sip:", so a SIPS remote party matched neither pattern and both the display name and the remote URI fell back to "Unknown" -- losing caller ID and the number needed to call back. Accept both schemes with sips?:. Behaviour for sip: URIs is unchanged.
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
CallerInfoextracts the display name and remote URI fromCallInfo.getRemoteUri()using two patterns, and both require a literalsip::The string
sips:does not contain the substringsip:— the characters ares,i,p,s,:— so a remote party using a SIPS URI matches neither pattern and falls into the final branch, where bothdisplayNameandremoteUribecome"Unknown".For an app registered over SIPS this means incoming calls arrive with no caller ID, and because
remoteUriis also"Unknown"there is no address left to call back with. The information is lost inside the library, so consumers cannot recover it from the broadcast.Fix
Accept either scheme with
sips?:. Two characters, no behaviour change forsip:URIs.Checked against both schemes, with and without a display name:
"Alice" <sip:1001@pbx.example.com>Alice1001@pbx.example.com"Alice" <sips:1001@pbx.example.com>Alice1001@pbx.example.com<sip:1001@pbx.example.com>1001@pbx.example.com1001@pbx.example.com<sips:1001@pbx.example.com>1001@pbx.example.com1001@pbx.example.comThe first two rows and last two rows previously differed: the
sips:cases returned"Unknown".Branched from current
develop.