aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-02 14:32:59 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-02 14:32:59 +0000
commite8a19920f8055190752bce569f00a48a8c9ce55c (patch)
tree677e6e28f0b3a7426d7001e6dfbbaff11cdf5e44 /main/channel.c
parent43635bd7dde5fb5b9c54165b14219a40e702bb11 (diff)
Added additional DTMF debug messages for when emulation occurs.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72888 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index 06337f44d..6e7b3f5b5 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2196,9 +2196,11 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
/* Drop first digit from the buffer */
memmove(chan->dtmfq, chan->dtmfq + 1, sizeof(chan->dtmfq) - 1);
f = &chan->dtmff;
- if (ast_test_flag(chan, AST_FLAG_END_DTMF_ONLY))
+ if (ast_test_flag(chan, AST_FLAG_END_DTMF_ONLY)) {
+ ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass, chan->name);
chan->dtmff.frametype = AST_FRAME_DTMF_END;
- else {
+ } else {
+ ast_log(LOG_DTMF, "DTMF begin emulation of '%c' with duration %d queued on %s\n", f->subclass, AST_DEFAULT_EMULATE_DTMF_DURATION, chan->name);
chan->dtmff.frametype = AST_FRAME_DTMF_BEGIN;
ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
chan->emulate_dtmf_digit = f->subclass;
@@ -2363,6 +2365,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
chan->emulate_dtmf_duration = AST_MIN_DTMF_DURATION;
} else
chan->emulate_dtmf_duration = AST_DEFAULT_EMULATE_DTMF_DURATION;
+ ast_log(LOG_DTMF, "DTMF begin emulation of '%c' with duration %d queued on %s\n", f->subclass, chan->emulate_dtmf_duration, chan->name);
}
} else {
struct timeval now = ast_tvnow();
@@ -2403,6 +2406,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
chan->dtmf_tv = now;
ast_clear_flag(chan, AST_FLAG_EMULATE_DTMF);
chan->emulate_dtmf_digit = 0;
+ ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass, chan->name);
}
}
break;
@@ -2433,6 +2437,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
f->subclass = chan->emulate_dtmf_digit;
f->len = ast_tvdiff_ms(now, chan->dtmf_tv);
chan->dtmf_tv = now;
+ ast_log(LOG_DTMF, "DTMF end emulation of '%c' queued on %s\n", f->subclass, chan->name);
} else {
/* Drop voice frames while we're still in the middle of the digit */
ast_frfree(f);