Fix sdp connection address#1552
Open
jsmhlz wants to merge 2 commits intosipsorcery-org:masterfrom
Open
Conversation
…not guaranteed this will be used which can cause 1way audio issues. This change means that if a publicIPAddress is specified (ie passed all the way down into CreateAnswer) then it is guaranteed to be used as the connection IP address in the SDP answer
…p-connection-address-fix
Member
|
The same effect can already be achieved by passing the IP address into the Answer method using the `publicIpAddress parameter. |
Author
|
Yeah that's what I thought, but I found a weird edge case in the wild where it just doesn't apply. I figure if the IP is provided it should be guaranteed to use the provided IP address, which this PR does do :) |
Member
|
Would it be possible to provide some more info about the edge case to see if there's a better way to fix it? The problem with burying public IP address properties way down in the code is callers need to somehow discover them as well as setting them in mulitple places. |
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.
I recently encountered an issue where an upstream SBC is sending an inbound call to my application, the application answers it but sends the local IP in the SDP connection info. To fix this, I specified the public IP in the UserAgent.Answer but discovered the local IP still being sent. I have made this change in RTPSession.cs to ensure the given public IP used in the UserAgent.Answer is used in the CreateAnswer if the IP Address has been specified.