mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +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:
10
app.c
10
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.frametype = AST_FRAME_DTMF;
|
||||||
f.subclass = *ptr;
|
f.subclass = *ptr;
|
||||||
f.src = "ast_dtmf_stream";
|
f.src = "ast_dtmf_stream";
|
||||||
if (strchr("0123456789*#abcdABCD",*ptr)==NULL) {
|
if (strchr("0123456789*#abcdfABCDF",*ptr)==NULL) {
|
||||||
ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdD allowed)\n",*ptr);
|
ast_log(LOG_WARNING, "Illegal DTMF character '%c' in string. (0-9*#aAbBcCdDfF allowed)\n",*ptr);
|
||||||
|
} else {
|
||||||
|
if (*ptr == 'f' || *ptr == 'F') {
|
||||||
|
/* ignore return values if not supported by channel */
|
||||||
|
ast_indicate(chan, AST_CONTROL_FLASH);
|
||||||
|
res = 0;
|
||||||
} else {
|
} else {
|
||||||
res = ast_write(chan, &f);
|
res = ast_write(chan, &f);
|
||||||
|
}
|
||||||
if (res)
|
if (res)
|
||||||
break;
|
break;
|
||||||
/* pause between digits */
|
/* pause between digits */
|
||||||
|
|||||||
Reference in New Issue
Block a user