aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-09 16:37:08 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-09 16:37:08 +0000
commit043bbef5b2086f737bb26ad7a399740cde4bbc33 (patch)
treeef7b46fd6e97928c1606db94940579832f005ae4 /main
parent50660eb42e1578193a01999664587f2655409dbd (diff)
Merged revisions 121280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r121280 | russell | 2008-06-09 11:35:40 -0500 (Mon, 09 Jun 2008) | 10 lines Do not attempt to do emulation if an END digit is received and the length is less than the defined minimum digit length, and the other end only wants END digits (SIP INFO, for example). (closes issue #12778) Reported by: tsearle Patches: 12778.rev1.txt uploaded by russell (license 2) Tested by: tsearle ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121282 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index 00b7eaf72..191d4f222 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -2559,7 +2559,7 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
ast_log(LOG_DTMF, "DTMF end accepted without begin '%c' on %s\n", f->subclass, chan->name);
f->len = AST_MIN_DTMF_DURATION;
}
- if (f->len < AST_MIN_DTMF_DURATION) {
+ if (f->len < AST_MIN_DTMF_DURATION && !ast_test_flag(chan, AST_FLAG_END_DTMF_ONLY)) {
ast_log(LOG_DTMF, "DTMF end '%c' has duration %ld but want minimum %d, emulating on %s\n", f->subclass, f->len, AST_MIN_DTMF_DURATION, chan->name);
ast_set_flag(chan, AST_FLAG_EMULATE_DTMF);
chan->emulate_dtmf_digit = f->subclass;
@@ -2568,6 +2568,9 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio)
f = &ast_null_frame;
} else {
ast_log(LOG_DTMF, "DTMF end passthrough '%c' on %s\n", f->subclass, chan->name);
+ if (f->len < AST_MIN_DTMF_DURATION) {
+ f->len = AST_MIN_DTMF_DURATION;
+ }
chan->dtmf_tv = now;
}
if (chan->audiohooks) {