diff options
author | Joshua Colp <jcolp@digium.com> | 2007-09-19 15:08:43 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2007-09-19 15:08:43 +0000 |
commit | 463c49e345b689e9e0c6e1412d956d56dd21096f (patch) | |
tree | 7eaea795786e0d7627c94c1744ae29e801b461d2 /apps/app_disa.c | |
parent | d816e7352c48c2d22035a369c680c75fba2996f0 (diff) |
DISA only needs to know about the end of DTMF, not the beginning/duration.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_disa.c')
-rw-r--r-- | apps/app_disa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c index f07e36b0b..081abe603 100644 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -179,6 +179,8 @@ static int disa_exec(struct ast_channel *chan, void *data) play_dialtone(chan, args.mailbox); + ast_set_flag(chan, AST_FLAG_END_DTMF_ONLY); + for (;;) { /* if outa time, give em reorder */ if (ast_tvdiff_ms(ast_tvnow(), lastdigittime) > ((k&2) ? digittimeout : firstdigittimeout)) { @@ -192,11 +194,14 @@ static int disa_exec(struct ast_channel *chan, void *data) continue; } - if (!(f = ast_read(chan))) + if (!(f = ast_read(chan))) { + ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); return -1; + } if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) { ast_frfree(f); + ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); return -1; } @@ -225,6 +230,7 @@ static int disa_exec(struct ast_channel *chan, void *data) fp = fopen(args.passcode,"r"); if (!fp) { ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name); + ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); return -1; } pwline[0] = 0; @@ -307,6 +313,8 @@ static int disa_exec(struct ast_channel *chan, void *data) } } + ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY); + if (k == 3) { int recheck = 0; struct ast_flags flags = { AST_CDR_FLAG_POSTED }; |