[Home]

Summary:ASTERISK-14801: wrong parsing of received RTCP packets
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2009-09-09 06:12:28Date Closed:2011-07-26 14:22:40
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/RTP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) eyebeam-rtcp.pcap
Description:The code for parsing the RTCP packets is buggy. When an RTCP RR/SR frame is handled, it expects some fields present although they are optional.

E.g. take a look at the RTCP packets in the attached pcap dump. The first RTCP packet contains a RR without any RTP statistics data. Nevertheless Asterisk sets the statistics, reading wrong data from the RTCP packet (the following SDS).

****** ADDITIONAL INFORMATION ******

As far as I see, the buggy code is in 1.4 - trunk.
Comments:By: klaus3000 (klaus3000) 2009-09-09 06:13:33

btw: I am offline for the next week

By: Olle Johansson (oej) 2009-11-15 15:26:43.000-0600

I just went through this code in 1.4 and it's very buggy. It just parses the first report in a compound packet, ignoring the SDES and misbehaves in many ways. I guess that the new code is not much better, even though there has been some improvements in how we aggregate data.

By: Olle Johansson (oej) 2010-01-13 03:43:05.000-0600

I have a fix for this in the pinefrog-1.4 branch. However, lmadsen did not want to include that in the 1.4 release he's working with, so I'll put it on hold until the management feels like fixing stuff.

Meanwhile, feel free to test pinefrog-1.4. I will upgrade those patches to pinefrog-trunk after a while of testing and ask for permission to merge it into trunk.

By: Olle Johansson (oej) 2010-01-13 03:43:31.000-0600

Btw, Asterisk now sends the same packet in order to open up NAT (that is, in pinefrog).

By: Olle Johansson (oej) 2010-06-02 05:49:52

Klaus, did you take a look at my branch?

By: klaus3000 (klaus3000) 2010-06-02 07:11:52

No, sorry. Which branch should I test? pinefrog-1.4 or pinefrog-trunk?

By: Olle Johansson (oej) 2010-06-02 07:16:58

Pinefrog-1.4 is the one with the code. Pinefrog-trunk hasn't been committed to yet. We're working on it.

By: klaus3000 (klaus3000) 2010-06-02 11:41:07

I just checked trunk: Trunk does handle receiver-report with RC=0 correct - due to the following code:

               if (rc == 0 && pt == RTCP_PT_RR) {      /* We're receiving a receiver report with no reports, which is ok */
                       position += (length + 1);
                       continue;
               }

that should be added to older Asterisk versions too.

AFAIS there is still problems with SR and RC=0 in trunk. I will take a look at Olle's branch (after the long weekend - public holiday in Austria)

By: Olle Johansson (oej) 2010-06-02 12:18:51

I fixed that in trunk as a result of my work with pinefrog...
I'll check how we handle SRs too.

/O

By: Leif Madsen (lmadsen) 2011-07-26 14:22:35.231-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

If this is still an issue, please open a new issue so it can be re-triaged appropriately. Thanks!