[asterisk-commits] russell: branch 1.4 r174985 - /branches/1.4/main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 11 17:56:38 CST 2009


Author: russell
Date: Wed Feb 11 17:56:37 2009
New Revision: 174985

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=174985
Log:
Fixify infinite DTMF in the case that no RFC2833 END event is ever received

Modified:
    branches/1.4/main/rtp.c

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=174985&r1=174984&r2=174985
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Wed Feb 11 17:56:37 2009
@@ -1298,6 +1298,18 @@
 
 	/* Record received timestamp as last received now */
 	rtp->lastrxts = timestamp;
+
+	if (rtp->dtmfcount) {
+		rtp->dtmfcount -= (timestamp - rtp->lastrxts);
+
+		if (rtp->dtmfcount < 0) {
+			rtp->dtmfcount = 0;
+		}
+
+		if (rtp->resp && !rtp->dtmfcount) {
+			return send_dtmf(rtp, AST_FRAME_DTMF_END);
+		}
+	}
 
 	rtp->f.mallocd = 0;
 	rtp->f.datalen = res - hdrlen;




More information about the asterisk-commits mailing list