[asterisk-commits] file: branch 1.4 r77460 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 26 18:19:05 CDT 2007


Author: file
Date: Thu Jul 26 18:19:04 2007
New Revision: 77460

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77460
Log:
(closes issue #10302)
Reported by: litnialex
If a DTMF end frame comes from a channel without a begin and it is going to a technology that only accepts end frames (aka INFO) then use the minimum DTMF duration if one is not in the frame already.

Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=77460&r1=77459&r2=77460
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Thu Jul 26 18:19:04 2007
@@ -2373,9 +2373,12 @@
 				}
 			} else {
 				struct timeval now = ast_tvnow();
-				ast_clear_flag(chan, AST_FLAG_IN_DTMF);
-				if (!f->len)
-					f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
+				if (ast_test_flag(chan, AST_FLAG_IN_DTMF)) {
+					ast_clear_flag(chan, AST_FLAG_IN_DTMF);
+					if (!f->len)
+						f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
+				} else if (!f->len)
+					f->len = AST_MIN_DTMF_DURATION;
 				if (f->len < AST_MIN_DTMF_DURATION) {
 					ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
 					chan->emulate_dtmf_digit = f->subclass;




More information about the asterisk-commits mailing list