Skip to content

TEL-1120 Adding provider info to InternalCreateSIPParticipantRequest - #1850

Open
genseric-ghiro wants to merge 5 commits into
mainfrom
gensericghiro/tel-1120-block-911-on-outbound-calls-from-livekit-phone-numbers
Open

genseric-ghiro wants to merge 5 commits into
mainfrom
gensericghiro/tel-1120-block-911-on-outbound-calls-from-livekit-phone-numbers

Conversation

@genseric-ghiro

@genseric-ghiro genseric-ghiro commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adding provider info to InternalCreateSIPParticipantRequest
  • Utility for parsing URI user and asserting if it's an emergency phone number
  • This gives us the ability to block emergency calls depending on the provider

@genseric-ghiro
genseric-ghiro requested a review from a team October 9, 2026 20:02
@genseric-ghiro genseric-ghiro self-assigned this Oct 9, 2026
@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 701383c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
github.com/livekit/protocol Patch
@livekit/protocol Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread sip/phonenumber.go
// URIUser returns the user part of a sip, sips or tel URI, with the display
// name, angle brackets, host and parameters removed. A URI with no user part
// and anything that is not a URI returns an empty string.
func URIUser(uri string) string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to address this now. But I feel like there's similar code in other places like

// validateNameAddrHeader validates headers that use name-addr format per RFC 3261 Section 20.10
func validateNameAddrHeader(value string) error {
// RFC 3261 Section 20.10 - name-addr format
// name-addr = [display-name] <addr-spec>
// addr-spec = SIP-URI / SIPS-URI / absoluteURI
uri := value
start, end, err := findAngleBrackets(value)
if err != nil {
return err
}
if start >= 0 || end >= 0 {
uri = value[start+1 : end]
if err := validateDisplayName(strings.TrimSpace(value[:start])); err != nil {
return err
}
} else {
// This is a bare URI, and should comply with addr-spec, no special characters
if strings.ContainsAny(value, ",? ") {
return errors.New("bare URI with special characters")
}
}
return validateURI(uri)
}
that we might need to add some common utils.

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.

2 participants