[asterisk-commits] russell: branch russell/issue_14460 r175120 - /team/russell/issue_14460/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 12 10:18:39 CST 2009
Author: russell
Date: Thu Feb 12 10:18:39 2009
New Revision: 175120
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=175120
Log:
Don't play DTMF for forever if we don't get an END event
Modified:
team/russell/issue_14460/main/rtp.c
Modified: team/russell/issue_14460/main/rtp.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/issue_14460/main/rtp.c?view=diff&rev=175120&r1=175119&r2=175120
==============================================================================
--- team/russell/issue_14460/main/rtp.c (original)
+++ team/russell/issue_14460/main/rtp.c Thu Feb 12 10:18:39 2009
@@ -1298,6 +1298,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;
More information about the asterisk-commits
mailing list