sipsorcery-org / sipsorcery

A WebRTC, SIP and VoIP library for C# and .NET. Designed for real-time communications apps.
https://sipsorcery-org.github.io/sipsorcery
Other
1.42k stars 431 forks source link

REMB - fix serialisation #1073

Closed theimowski closed 6 months ago

theimowski commented 6 months ago

I've found a bug in REMB packet serialisation.

For reference, here's the layout:

// 0                   1                   2                   3
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//|  Unique identifier 'R' 'E' 'M' 'B'                            |
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//|  Num SSRC     | BR Exp    |  BR Mantissa                      |
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//|   SSRC feedback                                               |

Based on sample Wireshark dissect:

image

current code reads mantissa as ..00 0110 0100 0010 0010 (first two bits are always 0)

Made following changes:

sipsorcery commented 6 months ago

Thanks for the PR.

theimowski commented 6 months ago

Cheers! Any chance of getting a new version including the fix released any time soon?