[Freeswitch-svn] [commit] r5214 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Fri May 25 11:31:47 EDT 2007


Author: anthm
Date: Fri May 25 11:31:47 2007
New Revision: 5214

Modified:
   freeswitch/trunk/src/switch_rtp.c

Log:
possible fix for FSCORE-30

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Fri May 25 11:31:47 2007
@@ -751,9 +751,14 @@
 		rtp_session->dtmf_data.out_digit_packet[2] = (unsigned char) (duration >> 8);
 		rtp_session->dtmf_data.out_digit_packet[3] = (unsigned char) duration;
 
+		if (loops != 1) {
+			rtp_session->dtmf_data.out_digit_seq++;
+		}
 
 		for (x = 0; x < loops; x++) {
-			rtp_session->dtmf_data.out_digit_seq++;
+			if (loops == 1) {
+				rtp_session->dtmf_data.out_digit_seq++;
+			}
 			switch_rtp_write_manual(rtp_session,
 									rtp_session->dtmf_data.out_digit_packet,
 									4,
@@ -769,6 +774,8 @@
 
 		if (loops == 1) {
 			rtp_session->last_write_seq = 0;
+		} else {
+			rtp_session->dtmf_data.out_digit_seq = 0;
 		}
 	}
 
@@ -1409,7 +1416,7 @@
 	}
 
 
-	if (rtp_session->last_write_seq >0 && rtp_session->last_write_seq <= rtp_session->dtmf_data.out_digit_seq) {
+	if (rtp_session->last_write_seq > 0 && rtp_session->last_write_seq <= rtp_session->dtmf_data.out_digit_seq) {
 		send = 0;
 	}
 



More information about the Freeswitch-svn mailing list