[asterisk-commits] mnicholson: branch 1.6.2 r277256 - in /branches/1.6.2: ./ main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 16 12:31:35 CDT 2010


Author: mnicholson
Date: Fri Jul 16 12:31:30 2010
New Revision: 277256

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=277256
Log:
Merged revisions 277250 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r277250 | mnicholson | 2010-07-16 12:30:39 -0500 (Fri, 16 Jul 2010) | 11 lines
  
  Merged revisions 277247 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r277247 | mnicholson | 2010-07-16 12:29:57 -0500 (Fri, 16 Jul 2010) | 4 lines
    
    For pass through DTMF tones, measure the actual duration between the begin and end packets on the wire.  If it is detected to be less than AST_MIN_DTMF_DURATION, trigger dtmf emulation.
    
    AST-362
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/channel.c

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

Modified: branches/1.6.2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=277256&r1=277255&r2=277256
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Fri Jul 16 12:31:30 2010
@@ -2949,6 +2949,19 @@
 					ast_clear_flag(chan, AST_FLAG_IN_DTMF);
 					if (!f->len)
 						f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
+
+					/* detect tones that were received on
+					 * the wire with durations shorter than
+					 * AST_MIN_DTMF_DURATION and set f->len
+					 * to the actual duration of the DTMF
+					 * frames on the wire.  This will cause
+					 * dtmf emulation to be triggered later
+					 * on.
+					 */
+					if (ast_tvdiff_ms(now, chan->dtmf_tv) < AST_MIN_DTMF_DURATION) {
+						f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
+						ast_log(LOG_DTMF, "DTMF end '%c' detected to have actual duration %ld on the wire, emulation will be triggered on %s\n", f->subclass, f->len, chan->name);
+					}
 				} else if (!f->len) {
 					ast_log(LOG_DTMF, "DTMF end accepted without begin '%c' on %s\n", f->subclass, chan->name);
 					f->len = AST_MIN_DTMF_DURATION;




More information about the asterisk-commits mailing list