aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 282e187cd..b896d64fa 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -1436,7 +1436,11 @@ static void process_dtmf_rfc2833(struct ast_rtp_instance *instance, unsigned cha
}
new_duration = (new_duration & ~0xFFFF) | samples;
- if (rtp->lastevent > seqno) {
+ /* The second portion of this check is to not mistakenly
+ * stop accepting DTMF if the seqno rolls over beyond
+ * 65535.
+ */
+ if (rtp->lastevent > seqno && rtp->lastevent - seqno < 50) {
/* Out of order frame. Processing this can cause us to
* improperly duplicate incoming DTMF, so just drop
* this.