--- res_rtp_asterisk.c.orig 2020-04-01 20:28:07.000000000 +0200 +++ res_rtp_asterisk.c 2020-04-01 20:30:34.000000000 +0200 @@ -5426,7 +5426,8 @@ if (event_end & 0x80) { /* End event */ - if ((rtp->last_seqno != seqno) && (timestamp > rtp->last_end_timestamp)) { + ast_debug(1,"TNE Test Event end last_end_timestamp:%d timestamp:%d\n",rtp->last_end_timestamp,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;