diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-06 14:31:13 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-06 14:31:13 +0000 |
commit | 22d5cf2893965214957acc307712144ae280fb13 (patch) | |
tree | 69e8b7698fa2879adefd5de727c836f0d34fd054 /res/res_rtp_asterisk.c | |
parent | 3a4a5af465fa7bf4b110be01c0c8e7be8dc7859d (diff) |
Merged revisions 274157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r274157 | mmichelson | 2010-07-06 09:29:23 -0500 (Tue, 06 Jul 2010) | 16 lines
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/trunk@274164 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r-- | res/res_rtp_asterisk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 282e187cd..b896d64fa 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1436,7 +1436,11 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha } 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. |