From: Russell Bryant Date: Thu, 18 Nov 2004 04:03:10 +0000 (+0000) Subject: detect sequence number rollover (bug #2887) X-Git-Tag: 1.0.11.1~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b05a4639dc143a0cb44e8c2b67b2cda6f94bd7b;p=thirdparty%2Fasterisk.git detect sequence number rollover (bug #2887) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4286 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/rtp.c b/rtp.c index dbe67a2401..bf122ff7b6 100755 --- a/rtp.c +++ b/rtp.c @@ -469,14 +469,14 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) /* This is special in-band data that's not one of our codecs */ if (rtpPT.code == AST_RTP_DTMF) { /* It's special -- rfc2833 process it */ - if (rtp->lasteventseqn <= seqno) { + if (rtp->lasteventseqn <= seqno || rtp->resp == 0 || (rtp->lasteventseqn >= 65530 && seqno <= 6)) { f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen); rtp->lasteventseqn = seqno; } else f = NULL; if (f) return f; else return &null_frame; } else if (rtpPT.code == AST_RTP_CISCO_DTMF) { /* It's really special -- process it the Cisco way */ - if (rtp->lasteventseqn <= seqno) { + if (rtp->lasteventseqn <= seqno || rtp->resp == 0 || (rtp->lasteventseqn >= 65530 && seqno <= 6)) { f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen); rtp->lasteventseqn = seqno; } else f = NULL;