[asterisk-commits] pcadach: trunk r53883 - in /trunk: ./
main/channel.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Feb 10 02:21:22 MST 2007
Author: pcadach
Date: Sat Feb 10 03:21:22 2007
New Revision: 53883
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53883
Log:
Merged revisions 53879 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53879 | pcadach | 2007-02-10 01:07:11 -0800 (Сбт, 10 Фев 2007) | 1 line
Provide correct DTMF duration
........
Modified:
trunk/ (props changed)
trunk/main/channel.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=53883&r1=53882&r2=53883
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Sat Feb 10 03:21:22 2007
@@ -2132,7 +2132,7 @@
}
break;
case AST_FRAME_DTMF_END:
- ast_log(LOG_DTMF, "DTMF end '%c' received on %s\n", f->subclass, chan->name);
+ ast_log(LOG_DTMF, "DTMF end '%c' received on %s, duration %ld ms\n", f->subclass, chan->name, f->len);
/* Queue it up if DTMF is deffered, or if DTMF emulation is forced.
* However, only let emulation be forced if the other end cares about BEGIN frames */
if ( ast_test_flag(chan, AST_FLAG_DEFER_DTMF) ||
@@ -2155,7 +2155,7 @@
} else {
ast_clear_flag(chan, AST_FLAG_IN_DTMF);
if (!f->len)
- f->len = ast_tvdiff_ms(chan->dtmf_begin_tv, ast_tvnow());
+ f->len = ast_tvdiff_ms(ast_tvnow(), chan->dtmf_begin_tv);
}
break;
case AST_FRAME_DTMF_BEGIN:
@@ -2186,6 +2186,7 @@
chan->emulate_dtmf_duration = 0;
f->frametype = AST_FRAME_DTMF_END;
f->subclass = chan->emulate_dtmf_digit;
+ f->len = ast_tvdiff_ms(ast_tvnow(), chan->dtmf_begin_tv);
} else {
chan->emulate_dtmf_duration -= f->samples / 8; /* XXX 8kHz */
ast_frfree(f);
More information about the asterisk-commits
mailing list