From 0e5ecf4a0d89cfe0dea79eb0c61a560c980f5031 Mon Sep 17 00:00:00 2001 From: Mark Spencer <markster@digium.com> Date: Wed, 17 Nov 2004 18:36:17 +0000 Subject: [PATCH] Fix rollover with DTMF (bug #2887) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4280 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rtp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rtp.c b/rtp.c index b198311ef5..efbc5de129 100755 --- a/rtp.c +++ b/rtp.c @@ -79,7 +79,7 @@ struct ast_rtp { unsigned int lastrxts; unsigned int lastividtimestamp; unsigned int lastovidtimestamp; - unsigned int lasteventseqn; + unsigned int lasteventtimestamp; int lasttxformat; int lastrxformat; int dtmfcount; @@ -490,16 +490,16 @@ 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->lasteventtimestamp <= timestamp) { f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen); - rtp->lasteventseqn = seqno; + rtp->lasteventtimestamp = timestamp; } 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->lasteventtimestamp <= timestamp) { f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen); - rtp->lasteventseqn = seqno; + rtp->lasteventtimestamp = timestamp; } else f = NULL; if (f) return f; else return &null_frame; } else if (rtpPT.code == AST_RTP_CN) { -- GitLab