[asterisk-commits] mmichelson: branch 1.4 r274157 - /branches/1.4/main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 6 09:29:31 CDT 2010


Author: mmichelson
Date: Tue Jul  6 09:29:23 2010
New Revision: 274157

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=274157
Log:
Fix problem with RFC 2833 DTMF not being accepted.

A recent check was added to ensure that we did not erroneously
detect duplicate DTMF when we received packets out of order.
The problem was that the check did not account for the fact that
the seqno of an RTP stream will roll over back to 0 after hitting
65535. Now, we have a secondary check that will ensure that the
seqno rolling over will not cause us to stop accepting DTMF.

(closes issue #17571)
Reported by: mdeneen
Patches: 
      rtp_seqno_rollover.patch uploaded by mmichelson (license 60)
Tested by: richardf, maxochoa, JJCinAZ


Modified:
    branches/1.4/main/rtp.c

Modified: branches/1.4/main/rtp.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/rtp.c?view=diff&rev=274157&r1=274156&r2=274157
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Tue Jul  6 09:29:23 2010
@@ -776,7 +776,11 @@
 			new_duration += 0xFFFF + 1;
 		new_duration = (new_duration & ~0xFFFF) | samples;
 
-		if (rtp->lastevent > seqno) {
+		/* The second portion of this check is to not mistakenly
+		 * stop accepting DTMF if the seqno rolls over beyond
+		 * 65535.
+		 */
+		if (rtp->lastevent > seqno && rtp->lastevent - seqno < 50) {
 			/* Out of order frame. Processing this can cause us to
 			 * improperly duplicate incoming DTMF, so just drop
 			 * this.




More information about the asterisk-commits mailing list