aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-17 19:04:48 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-11-17 19:04:48 +0000
commitd5cead5bdd649a18360c164b59c933976ad92a3b (patch)
tree47626705a907577f7baefac7e85dc78e7de81651 /rtp.c
parent8b0f4042ed8f49fe0dabd9ebd183eb19ea1a7089 (diff)
Revised seqno fix (bug #2887)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4281 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rtp.c b/rtp.c
index efbc5de12..b33be20d8 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 lasteventtimestamp;
+ unsigned int lasteventseqn;
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->lasteventtimestamp <= timestamp) {
+ 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->lasteventtimestamp = timestamp;
+ 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->lasteventtimestamp <= timestamp) {
+ 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->lasteventtimestamp = timestamp;
+ rtp->lasteventseqn = seqno;
} else f = NULL;
if (f) return f; else return &null_frame;
} else if (rtpPT.code == AST_RTP_CN) {