mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
AMI PlayDTMF Action: Make not compete with channel's media thread.
There can be one and only one thread handling a channel's media at a time. Otherwise, we don't know which thread is going to handle the media frames. ASTERISK-27625 Change-Id: Ia341f1a6f4d54f2022261abec9021fe5b2eb4905
This commit is contained in:
@@ -2177,13 +2177,31 @@ int ast_recvchar(struct ast_channel *chan, int timeout);
|
||||
|
||||
/*!
|
||||
* \brief Send a DTMF digit to a channel.
|
||||
*
|
||||
* \param chan channel to act upon
|
||||
* \param digit the DTMF digit to send, encoded in ASCII
|
||||
* \param duration the duration of the digit ending in ms
|
||||
*
|
||||
* \pre This must only be called by the channel's media handler thread.
|
||||
*
|
||||
* \return 0 on success, -1 on failure
|
||||
*/
|
||||
int ast_senddigit(struct ast_channel *chan, char digit, unsigned int duration);
|
||||
|
||||
/*!
|
||||
* \brief Send a DTMF digit to a channel from an external thread.
|
||||
*
|
||||
* \param chan channel to act upon
|
||||
* \param digit the DTMF digit to send, encoded in ASCII
|
||||
* \param duration the duration of the digit ending in ms
|
||||
*
|
||||
* \pre This must only be called by threads that are not the channel's
|
||||
* media handler thread.
|
||||
*
|
||||
* \return 0 on success, -1 on failure
|
||||
*/
|
||||
int ast_senddigit_external(struct ast_channel *chan, char digit, unsigned int duration);
|
||||
|
||||
/*!
|
||||
* \brief Send a DTMF digit to a channel.
|
||||
* \param chan channel to act upon
|
||||
|
Reference in New Issue
Block a user