[asterisk-commits] russell: branch 1.6.0 r178378 - in /branches/1.6.0: ./ main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 24 14:43:17 CST 2009


Author: russell
Date: Tue Feb 24 14:43:16 2009
New Revision: 178378

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=178378
Log:
Merged revisions 178374 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r178374 | russell | 2009-02-24 14:39:57 -0600 (Tue, 24 Feb 2009) | 14 lines

Merged revisions 178373 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r178373 | russell | 2009-02-24 14:36:19 -0600 (Tue, 24 Feb 2009) | 6 lines

Only set dtmfcount on BEGIN, and ensure it gets reset to 0 properly.

(issue #14460)
Reported by: moliveras
Tested by: russell

........

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

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

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

Modified: branches/1.6.0/main/rtp.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/rtp.c?view=diff&rev=178378&r1=178377&r2=178378
==============================================================================
--- branches/1.6.0/main/rtp.c (original)
+++ branches/1.6.0/main/rtp.c Tue Feb 24 14:43:16 2009
@@ -965,10 +965,11 @@
 		ast_log(LOG_DEBUG, "Ignoring RTP 2833 Event: %08x. Not a DTMF Digit.\n", event);
 		return &ast_null_frame;
 	}
-	
+
 	if (ast_test_flag(rtp, FLAG_DTMF_COMPENSATE)) {
 		if ((rtp->lastevent != timestamp) || (rtp->resp && rtp->resp != resp)) {
 			rtp->resp = resp;
+			rtp->dtmfcount = 0;
 			f = send_dtmf(rtp, AST_FRAME_DTMF_END);
 			f->len = 0;
 			rtp->lastevent = timestamp;
@@ -977,15 +978,16 @@
 		if ((!(rtp->resp) && (!(event_end & 0x80))) || (rtp->resp && rtp->resp != resp)) {
 			rtp->resp = resp;
 			f = send_dtmf(rtp, AST_FRAME_DTMF_BEGIN);
+			rtp->dtmfcount = dtmftimeout;
 		} else if ((event_end & 0x80) && (rtp->lastevent != seqno) && rtp->resp) {
 			f = send_dtmf(rtp, AST_FRAME_DTMF_END);
 			f->len = ast_tvdiff_ms(ast_samp2tv(samples, 8000), ast_tv(0, 0)); /* XXX hard coded 8kHz */
 			rtp->resp = 0;
+			rtp->dtmfcount = 0;
 			rtp->lastevent = seqno;
 		}
 	}
 
-	rtp->dtmfcount = dtmftimeout;
 	rtp->dtmfsamples = samples;
 
 	return f;




More information about the asterisk-commits mailing list