res_rtp_asterisk.c: Check for first DTMF having timestamp set to 0

When the first DTMF receive in RF2833 codec have TimeStamp at 0
is not processed.

ASTERISK-28812

Change-Id: I3196803a062dd2daee4938c9a778c3810cb7e504
pull/18/head
bernard merindol 5 years ago committed by Friendly Automation
parent 611529fa52
commit 7db03e12a7

@ -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;

Loading…
Cancel
Save