From eee55db162db75f4376222cc1d90ebb37e5bda95 Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 21 Jan 2009 20:47:52 +0000 Subject: [PATCH] We should only reset sanity if we did NOT ignore the previous packet. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11338 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_rtp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 11fd85eb4a..040d26d5f6 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1590,13 +1590,16 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ if (in_digit_seq > rtp_session->dtmf_data.in_digit_seq) { rtp_session->dtmf_data.in_digit_seq = in_digit_seq; - rtp_session->dtmf_data.in_digit_sanity = 2000; #ifdef DEBUG_2833 printf("read: %c %u %u %u %u %d %d %s\n", key, in_digit_seq, rtp_session->dtmf_data.in_digit_seq, ts, duration, rtp_session->recv_msg.header.m, end, end && !rtp_session->dtmf_data.in_digit_ts ? "ignored" : ""); #endif + /* only set sanity if we do NOT ignore the packet */ + if (rtp_session->dtmf_data.in_digit_ts) { + rtp_session->dtmf_data.in_digit_sanity = 2000; + } if (rtp_session->dtmf_data.last_duration > duration && ts == rtp_session->dtmf_data.in_digit_ts) { rtp_session->dtmf_data.flip++;