mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 22:45:49 +00:00
Bridge DTMF hooks: Made audio pass from the bridge while waiting for more matching digits.
* Made collecting DTMF digits for the DTMF feature hooks pass frames from the bridge. * Made collecting DTMF digits possible by other bridge hooks if there is a need. ASTERISK-24447 #close Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/4123/ ........ Merged revisions 427493 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@427494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "asterisk/bridge_features.h"
|
||||
#include "asterisk/bridge_technology.h"
|
||||
|
||||
/*! \brief State information about a bridged channel */
|
||||
@@ -162,6 +163,13 @@ struct ast_bridge_channel {
|
||||
/*! Digit currently sending into the bridge. (zero if not sending) */
|
||||
char dtmf_digit;
|
||||
} owed;
|
||||
/*! DTMF hook sequence state */
|
||||
struct {
|
||||
/*! Time at which the DTMF hooks should stop waiting for more digits to come. */
|
||||
struct timeval interdigit_timeout;
|
||||
/*! Collected DTMF digits for DTMF hooks. */
|
||||
char collected[MAXIMUM_DTMF_FEATURE_STRING];
|
||||
} dtmf_hook_state;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -647,6 +655,23 @@ int ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, con
|
||||
*/
|
||||
void ast_bridge_channel_kick(struct ast_bridge_channel *bridge_channel, int cause);
|
||||
|
||||
/*!
|
||||
* \brief Add a DTMF digit to the collected digits to match against DTMF features.
|
||||
* \since 12.8.0
|
||||
*
|
||||
* \param bridge_channel Channel that received a DTMF digit.
|
||||
* \param digit DTMF digit to add to collected digits or 0 for timeout event.
|
||||
*
|
||||
* \note Neither the bridge nor the bridge_channel locks should be held
|
||||
* when entering this function.
|
||||
*
|
||||
* \note This is intended to be called by bridge hooks and the
|
||||
* bridge channel thread.
|
||||
*
|
||||
* \return Nothing
|
||||
*/
|
||||
void ast_bridge_channel_feature_digit(struct ast_bridge_channel *bridge_channel, int digit);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user