Open nganju98 opened 6 months ago
I don't think the line 1032 in RTPSession.cs is the cause. But the way to check codec is somewhere incorrect. I don't use SIP neither PCMU ... So could you try to find where the test is incorrect ?
By the way SDPAudioVideoMediaFormat.AreMatch() is correct.
src/net/RTP/RTPSession.cs has a bug where lower case codecs won't map with Enum.Parse, because all the enums are upper case (PCMU vs pcmu). This bug was introduced by line 1032 in RTPSession.cs, where it says
currentMediaStream.LocalTrack.Capabilities = capabilities;
Steps to reproduce: just run the SIPCallServer example, and call the server with a SIP Invite that wants pcmu (lower case) as the audio codec. You'll get a bunch of errors that say "Can't encode to unknown codec" because the AudioFormat is unknown because it failed to map "pcmu" to the enum PCMU.