mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 19:43:03 +00:00
Allow a digitstream to contain a flash character ('f' or 'F') when sending dtmf string to a channel. (#4935)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
app.c
12
app.c
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user