sippy / rtpproxy

The RTPproxy is a high-performance software proxy for RTP streams that can work together with Sippy B2BUA, Kamailio, OpenSIPS and SER.
http://rtpproxy.org
BSD 2-Clause "Simplified" License
404 stars 114 forks source link

acct_rtcp_hep - malformed JSON format in Encapsulated Payload of a Receiver Report #126

Closed solarmon closed 1 year ago

solarmon commented 2 years ago

Hi,

As discovered in https://github.com/sipcapture/homer/issues/536 the JSON format of the Encapsulated Payload of a Receiver Report is malformed.

There is a trailing comma character on the last item of the JSON list.

Line 193 doesn't have the comma character:

https://github.com/sippy/rtpproxy/blob/b9d7b4ced2e9797f7d5d3f033af288fbc1aaecd8/modules/acct_rtcp_hep/rtcp2json.c#L193

But line 217 seems to have this comma character:

https://github.com/sippy/rtpproxy/blob/b9d7b4ced2e9797f7d5d3f033af288fbc1aaecd8/modules/acct_rtcp_hep/rtcp2json.c#L217

This was causing a display issue in Homer due to the malformed HEP packet. Once the offending comma (from line 217 of rtcp2json.c) was removed (and rtpproxy and modules recompiled) then the issue was resolved.

babakyakhchali commented 2 years ago

Thanks @solarmon The proposed solution solved my problem too