[Asterisk-cvs] asterisk rtp.c,1.64,1.65
markster at lists.digium.com
markster at lists.digium.com
Tue May 4 23:48:03 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv32280
Modified Files:
rtp.c
Log Message:
Ignore dupe packets for RFC2833 (bug #1034)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- rtp.c 1 May 2004 15:18:28 -0000 1.64
+++ rtp.c 5 May 2004 03:56:27 -0000 1.65
@@ -43,7 +43,7 @@
#define TYPE_DONTSEND 0x3
#define TYPE_MASK 0x3
-static int dtmftimeout = 300; /* 300 samples */
+static int dtmftimeout = 3000; /* 3000 samples */
static int rtpstart = 0;
static int rtpend = 0;
@@ -68,6 +68,7 @@
unsigned int lastrxts;
unsigned int lastividtimestamp;
unsigned int lastovidtimestamp;
+ unsigned int lasteventseqn;
int lasttxformat;
int lastrxformat;
int dtmfcount;
@@ -449,11 +450,17 @@
// 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 */
- f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
+ if (rtp->lasteventseqn <= seqno) {
+ f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
+ rtp->lasteventseqn = seqno;
+ }
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 */
- f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
+ if (rtp->lasteventseqn <= seqno) {
+ f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
+ rtp->lasteventseqn = seqno;
+ }
if (f) return f; else return &null_frame;
} else if (rtpPT.code == AST_RTP_CN) {
/* Comfort Noise */
More information about the svn-commits
mailing list