Revised seqno fix (bug #2887)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
0e5ecf4a0d
commit
c75879d64a
10
rtp.c
10
rtp.c
|
@ -79,7 +79,7 @@ struct ast_rtp {
|
||||||
unsigned int lastrxts;
|
unsigned int lastrxts;
|
||||||
unsigned int lastividtimestamp;
|
unsigned int lastividtimestamp;
|
||||||
unsigned int lastovidtimestamp;
|
unsigned int lastovidtimestamp;
|
||||||
unsigned int lasteventtimestamp;
|
unsigned int lasteventseqn;
|
||||||
int lasttxformat;
|
int lasttxformat;
|
||||||
int lastrxformat;
|
int lastrxformat;
|
||||||
int dtmfcount;
|
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 */
|
/* This is special in-band data that's not one of our codecs */
|
||||||
if (rtpPT.code == AST_RTP_DTMF) {
|
if (rtpPT.code == AST_RTP_DTMF) {
|
||||||
/* It's special -- rfc2833 process it */
|
/* 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);
|
f = process_rfc2833(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
|
||||||
rtp->lasteventtimestamp = timestamp;
|
rtp->lasteventseqn = seqno;
|
||||||
} else f = NULL;
|
} else f = NULL;
|
||||||
if (f) return f; else return &null_frame;
|
if (f) return f; else return &null_frame;
|
||||||
} else if (rtpPT.code == AST_RTP_CISCO_DTMF) {
|
} else if (rtpPT.code == AST_RTP_CISCO_DTMF) {
|
||||||
/* It's really special -- process it the Cisco way */
|
/* 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);
|
f = process_cisco_dtmf(rtp, rtp->rawdata + AST_FRIENDLY_OFFSET + hdrlen, res - hdrlen);
|
||||||
rtp->lasteventtimestamp = timestamp;
|
rtp->lasteventseqn = seqno;
|
||||||
} else f = NULL;
|
} else f = NULL;
|
||||||
if (f) return f; else return &null_frame;
|
if (f) return f; else return &null_frame;
|
||||||
} else if (rtpPT.code == AST_RTP_CN) {
|
} else if (rtpPT.code == AST_RTP_CN) {
|
||||||
|
|
Loading…
Reference in New Issue