Support specifying To/From SIP headers for outbound.#702
Open
dennwc wants to merge 1 commit into
Open
Conversation
hechen-eng
reviewed
Jun 11, 2026
hechen-eng
left a comment
Contributor
There was a problem hiding this comment.
it'll be great if we can add some tests..
| Addr: contact.Addr, | ||
| Transport: tr, | ||
| } | ||
|
|
| p := &sip.Uri{Scheme: "sip"} | ||
| setUriTransport(p, tr) | ||
| if err := esip.ParseUri(raw, p); err != nil { | ||
| return nil, psrpc.NewErrorf(psrpc.InvalidArgument, "invalid request URI") |
Contributor
There was a problem hiding this comment.
shall we return a plain fmt.Errorf? it'll be wrapped as psrpc error in the caller
| "github.com/frostbyte73/core" | ||
| "golang.org/x/exp/maps" | ||
|
|
||
| esip "github.com/emiago/sipgo/sip" |
Contributor
There was a problem hiding this comment.
we are using both emiago sipgo and livekit sipgo. Do we plan to only rely on one of them?
Contributor
Author
There was a problem hiding this comment.
LK fork just aliases all types/functions we use to upstream ones. The only reason I import upstream here is that we don't have alias for that function/type.
| func buildRawURI(raw string, tr livekit.SIPTransport) (*sip.Uri, error) { | ||
| p := &sip.Uri{Scheme: "sip"} | ||
| setUriTransport(p, tr) | ||
| if err := esip.ParseUri(raw, p); err != nil { |
Contributor
There was a problem hiding this comment.
this seems to be a bug since it'll drop what's set in setUriTransport?
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.
No description provided.