summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-07-12 14:24:36 -0400
committerCorey Farrell <git@cfware.com>2017-07-12 19:08:23 -0400
commit6b138046e7db59e975fc06ee3aea54fe0c143f5d (patch)
tree5d1297d795a8640b0b1f15b52652131688541197 /include/asterisk/channel.h
parent27aeca3594ae6618ffcafc8fe764fb0c9507ec14 (diff)
core: Add digit filtering to ast_waitfordigit_full
This adds a parameter to ast_waitfordigit_full which can be used to only stop waiting when certain expected digits are received. Any unexpected DTMF digits are simply ignored. This also creates a new dialplan application WaitDigit. ASTERISK-27129 #close Change-Id: Id233935ea3d13e71c75a0861834c5936c3700ef9
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 197cc990d..cb2e0e6a4 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -2219,11 +2219,12 @@ int ast_waitfordigit(struct ast_channel *c, int ms);
* Same as ast_waitfordigit() with audio fd for outputting read audio and ctrlfd to monitor for reading.
* \param c channel to wait for a digit on
* \param ms how many milliseconds to wait (<0 for indefinite).
+ * \param breakon string of DTMF digits to break upon or NULL for any.
* \param audiofd audio file descriptor to write to if audio frames are received
* \param ctrlfd control file descriptor to monitor for reading
* \return Returns 1 if ctrlfd becomes available
*/
-int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int ctrlfd);
+int ast_waitfordigit_full(struct ast_channel *c, int ms, const char *breakon, int audiofd, int ctrlfd);
/*!
* \brief Reads multiple digits