Skip to content
Snippets Groups Projects
Commit 50edc080 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix SendDTMF which was clearly not even tested before it was last committed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 0b2a9dc2
No related branches found
No related tags found
No related merge requests found
...@@ -55,18 +55,17 @@ static int senddtmf_exec(struct ast_channel *chan, void *data) ...@@ -55,18 +55,17 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
f.frametype = AST_FRAME_DTMF; f.frametype = AST_FRAME_DTMF;
f.subclass = digits[x]; f.subclass = digits[x];
f.src = "app_senddtmf"; f.src = "app_senddtmf";
res = ast_write(chan, &f); if (strchr("0123456789*#abcd",digits[x])==NULL) {
if (strchr("0123456789*#abcd",digits[x])==NULL) { ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n");
ast_log(LOG_WARNING, "Illegal DTMF character in string. (0-9*#abcd allowed)\n"); } else {
} else { res = ast_write(chan, &f);
res = ast_write(chan, &f); if (res)
if (res) break;
break; /* Wait 250ms */
/* Wait 250ms */ res = ast_safe_sleep(chan, 250);
res = ast_safe_sleep(chan, 250); if (res)
if (res) break;
break; }
}
} }
if (!res) if (!res)
if (option_verbose > 2) if (option_verbose > 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment