[svn-commits] pcadach: branch 1.4 r53879 -
/branches/1.4/main/channel.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Sat Feb 10 02:07:12 MST 2007
Author: pcadach
Date: Sat Feb 10 03:07:11 2007
New Revision: 53879
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53879
Log:
Provide correct DTMF duration
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=53879&r1=53878&r2=53879
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Sat Feb 10 03:07:11 2007
@@ -2215,7 +2215,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) ||
@@ -2238,7 +2238,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:
@@ -2269,6 +2269,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 svn-commits
mailing list