diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-07 20:14:19 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-07 20:14:19 +0000 |
commit | aa532ec52944915351d6d702fecff3e70007a0cf (patch) | |
tree | bd5ec8a5423b2af261a6b6919a2ee604539ca76b /apps/app_senddtmf.c | |
parent | ffc19c36e82a3db1e09045825a0e82d6358d3529 (diff) |
Fix SendDTMF which was clearly not even tested before it was last committed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2657 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_senddtmf.c')
-rwxr-xr-x | apps/app_senddtmf.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c index c2ca2c2f3..2e85b01d3 100755 --- a/apps/app_senddtmf.c +++ b/apps/app_senddtmf.c @@ -55,18 +55,17 @@ static int senddtmf_exec(struct ast_channel *chan, void *data) f.frametype = AST_FRAME_DTMF; f.subclass = digits[x]; f.src = "app_senddtmf"; - res = ast_write(chan, &f); - if (strchr("0123456789*#abcd",digits[x])==NULL) { - ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n"); - } else { - res = ast_write(chan, &f); - if (res) - break; - /* Wait 250ms */ - res = ast_safe_sleep(chan, 250); - if (res) - break; - } + if (strchr("0123456789*#abcd",digits[x])==NULL) { + ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n"); + } else { + res = ast_write(chan, &f); + if (res) + break; + /* Wait 250ms */ + res = ast_safe_sleep(chan, 250); + if (res) + break; + } } if (!res) if (option_verbose > 2) |