say.c: Honor requests for DTMF interruption.

SayAlpha, SayAlphaCase, SayDigits, SayMoney, SayNumber, SayOrdinal,
and SayPhonetic all claim to allow DTMF interruption if the
SAY_DTMF_INTERRUPT channel variable is set to a truthy value, but we
are failing to break out of a given 'say' application if DTMF actually
occurs.

ASTERISK-29816 #close

Change-Id: I6a96e0130560831d2cb45164919862b9bcb6287e
This commit is contained in:
Sean Bright
2021-12-23 16:57:59 -05:00
committed by Friendly Automation
parent 4e204db2bf
commit 4fe94bab09
2 changed files with 37 additions and 67 deletions

View File

@@ -189,6 +189,13 @@ static int say_filenames(struct ast_channel *chan, const char *ints, const char
res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
else
res = ast_waitstream(chan, ints);
if (res > 0) {
/* We were interrupted by a digit */
ast_stopstream(chan);
ast_free(filenames);
return res;
}
}
ast_stopstream(chan);
}