No subject


Thu Jan 15 22:29:28 CST 2009


      Limiting the time period of extending the tone is necessary
      to avoid that a tone "gets stuck". Regardless of the
      algorithm used, the tone SHOULD NOT be extended by more than
      three packet interarrival times. A slight extension of tone
      durations and shortening of pauses is generally harmless.

Three seconds will pretty much _always_ be far more than three packet 
interarrival times.  However, that behavior is not required, so I'm going to
leave it with our legacy behavior for now.

Code from svn/asterisk/team/russell/issue_14460

(closes issue #14460)
Reported by: moliveras

........

................

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/main/rtp.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/main/rtp.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.1/main/rtp.c?view=diff&rev=175129&r1=175128&r2=175129
==============================================================================
--- branches/1.6.1/main/rtp.c (original)
+++ branches/1.6.1/main/rtp.c Thu Feb 12 11:08:25 2009
@@ -1749,6 +1749,21 @@
 	/* 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) {
+			struct ast_frame *f;
+			f = send_dtmf(rtp, AST_FRAME_DTMF_END);
+			rtp->resp = 0;
+			return f;
+		}
+	}
+
 	rtp->f.mallocd = 0;
 	rtp->f.datalen = res - hdrlen;
 	rtp->f.data.ptr = rtp->rawdata + hdrlen + AST_FRIENDLY_OFFSET;




More information about the asterisk-commits mailing list