Archived
14
0
Fork 0

Allow a digitstream to contain a flash character ('f' or 'F') when sending dtmf string to a channel. (#4935)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7948 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mattf 2006-01-10 21:35:45 +00:00
parent 2688743929
commit dd86739302

12
app.c
View file

@ -304,10 +304,16 @@ int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digi
f.frametype = AST_FRAME_DTMF;
f.subclass = *ptr;
f.src = "ast_dtmf_stream";
if (strchr("0123456789*#abcdABCD",*ptr)==NULL) {
ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdD allowed)\n",*ptr);
if (strchr("0123456789*#abcdfABCDF",*ptr)==NULL) {
ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdDfF allowed)\n",*ptr);
} else {
res = ast_write(chan, &f);
if (*ptr == 'f' || *ptr == 'F') {
/* ignore return values if not supported by channel */
ast_indicate(chan, AST_CONTROL_FLASH);
res = 0;
} else {
res = ast_write(chan, &f);
}
if (res)
break;
/* pause between digits */