diff options
author | Richard Mudgett <rmudgett@digium.com> | 2014-11-24 20:31:08 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2014-11-24 20:31:08 +0000 |
commit | 1583ea48322b607901dcbc770a758f506ceda7f4 (patch) | |
tree | 50b0d9c0f3dc50dd4c49ab3d360228c7b1d1e7db /main/bridge_channel.c | |
parent | 7f4b222e07fcd56378539154f6a3de45805ac711 (diff) |
DTMF hooks: Leaving channels need to push any collected digits into the bridge.
Any partially collected DTMF digits for a DTMF hook need to be pushed into
the bridge when a channel leaves the bridging system as if there were a
timeout.
Review: https://reviewboard.asterisk.org/r/4199/
........
Merged revisions 428601 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@428602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/bridge_channel.c')
-rw-r--r-- | main/bridge_channel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/bridge_channel.c b/main/bridge_channel.c index 60fa03082..e59d28e17 100644 --- a/main/bridge_channel.c +++ b/main/bridge_channel.c @@ -2564,10 +2564,15 @@ int bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel) ast_bridge_unlock(bridge_channel->bridge); bridge_channel_event_join_leave(bridge_channel, AST_BRIDGE_HOOK_TYPE_JOIN); + while (bridge_channel->state == BRIDGE_CHANNEL_STATE_WAIT) { /* Wait for something to do. */ bridge_channel_wait(bridge_channel); } + + /* Force a timeout on any accumulated DTMF hook digits. */ + ast_bridge_channel_feature_digit(bridge_channel, 0); + bridge_channel_event_join_leave(bridge_channel, AST_BRIDGE_HOOK_TYPE_LEAVE); ast_bridge_channel_lock_bridge(bridge_channel); } |