]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Compensate for out of order packets better if RFC2833 compensation is turned on.
authorJoshua Colp <jcolp@digium.com>
Wed, 27 Sep 2006 19:10:59 +0000 (19:10 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 27 Sep 2006 19:10:59 +0000 (19:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@43798 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 748837eee484c75c1515c37ff723f97ae92c4273..deef1e3be729c1bda476c7589af08fdfcadaf644 100644 (file)
@@ -681,6 +681,12 @@ static struct ast_frame *process_rfc2833(struct ast_rtp *rtp, unsigned char *dat
                f->samples = duration;
                rtp->resp = 0;
                rtp->lasteventendseqn = seqno;
+       } else if (ast_test_flag(rtp, FLAG_DTMF_COMPENSATE) && event_end & 0x80 && rtp->lasteventendseqn != seqno) {
+               rtp->resp = resp;
+               f = send_dtmf(rtp, AST_FRAME_DTMF_END);
+               f->samples = duration;
+               rtp->resp = 0;
+               rtp->lasteventendseqn = seqno;
        }
 
        rtp->dtmfcount = dtmftimeout;