]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk.c: Check for first DTMF having timestamp set to 0
authorbernard merindol <bernard.merindol@telnowedge.com>
Wed, 8 Apr 2020 10:29:42 +0000 (12:29 +0200)
committerJoshua Colp <jcolp@sangoma.com>
Tue, 14 Apr 2020 15:49:59 +0000 (10:49 -0500)
When the first DTMF receive in RF2833 codec have TimeStamp at 0
is not processed.

ASTERISK-28812

Change-Id: I3196803a062dd2daee4938c9a778c3810cb7e504

res/res_rtp_asterisk.c

index 739b17b7783832fd7fbf6fde420159a01c50a3be..4fc42177ceae2d1946ae48a0ef8a4143a666aadc 100644 (file)
@@ -5492,7 +5492,7 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha
 
                if (event_end & 0x80) {
                        /* End event */
-                       if ((rtp->last_seqno != seqno) && (timestamp > rtp->last_end_timestamp)) {
+                       if ((rtp->last_seqno != seqno) && ((timestamp > rtp->last_end_timestamp) || ((timestamp == 0) && (rtp->last_end_timestamp == 0)))) {
                                rtp->last_end_timestamp = timestamp;
                                rtp->dtmf_duration = new_duration;
                                rtp->resp = resp;