]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
We should only reset sanity if we did NOT ignore the previous packet.
authorBrian West <brian@freeswitch.org>
Wed, 21 Jan 2009 20:47:52 +0000 (20:47 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 21 Jan 2009 20:47:52 +0000 (20:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11338 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_rtp.c

index 11fd85eb4a479800b53d832cf92ad8d628e5ceb6..040d26d5f6d28e2b39982b3b844fdd9fcf88e29c 100644 (file)
@@ -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++;