aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-06 14:29:23 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-06 14:29:23 +0000
commitb54904688d32e1dc88eff71f62845b5e60b7a5c2 (patch)
tree6744b37180fb41749e893cec932d16fb225566dd /main
parent02b956b6b849668b01de9ad8e5f7c1d5238650e6 (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@274157 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/rtp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 121f6aed8..5a1266a3c 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -776,7 +776,11 @@ static void process_rfc2833(struct ast_rtp *rtp, unsigned char *data, int len, u
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.