Summary: | ASTERISK-22043: Handle DTMF wrap up operations and Hold wrap up operations when a channel is pulled from the bridge | ||
Reporter: | Matt Jordan (mjordan) | Labels: | Asterisk12 |
Date Opened: | 2013-07-07 21:22:04 | Date Closed: | 2013-08-23 13:35:03 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/Bridging |
Versions: | 12 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | If a channel is pulled from the bridge and a DTMF digit is currently being played on it, or if it currently in a Hold state, we need to end the DTMF digit and take the channel of hold, respectively.
This addresses the BUGBUG in bridging.c: {noformat} static void bridge_channel_pull(struct ast_bridge_channel *bridge_channel) { struct ast_bridge *bridge = bridge_channel->bridge; if (!bridge_channel->in_bridge) { return; } bridge_channel->in_bridge = 0; ast_debug(1, "Bridge %s: pulling %p(%s)\n", bridge->uniqueid, bridge_channel, ast_channel_name(bridge_channel->chan)); /* BUGBUG This is where incoming HOLD/UNHOLD memory should write UNHOLD into bridge. (if not local optimizing) */ /* BUGBUG This is where incoming DTMF begin/end memory should write DTMF end into bridge. (if not local optimizing) */ if (!bridge_channel->just_joined) { /* Tell the bridge technology we are leaving so they tear us down */ ast_debug(1, "Bridge %s: %p(%s) is leaving %s technology\n", bridge->uniqueid, bridge_channel, ast_channel_name(bridge_channel->chan), bridge->technology->name); if (bridge->technology->leave) { bridge->technology->leave(bridge, bridge_channel); } } {noformat} And here: {noformat} case AST_FRAME_CONTROL: switch (frame->subclass.integer) { case AST_CONTROL_HANGUP: bridge_handle_hangup(bridge_channel); ast_frfree(frame); return; /* BUGBUG This is where incoming HOLD/UNHOLD memory should register. Write UNHOLD into bridge when this channel is pulled. */ default: break; } break; case AST_FRAME_DTMF_BEGIN: frame = bridge_handle_dtmf(bridge_channel, frame); if (!frame) { return; } /* Fall through */ case AST_FRAME_DTMF_END: if (!bridge_channel->features->dtmf_passthrough) { ast_frfree(frame); return; } /* BUGBUG This is where incoming DTMF begin/end memory should register. Write DTMF end into bridge when this channel is pulled. */ {noformat} And lastly here: {noformat} /* BUGBUG This is where outgoing HOLD/UNHOLD memory should write UNHOLD to channel. */ /* Complete any partial DTMF digit before exiting the bridge. */ if (ast_channel_sending_dtmf_digit(bridge_channel->chan)) { ast_bridge_end_dtmf(bridge_channel->chan, ast_channel_sending_dtmf_digit(bridge_channel->chan), ast_channel_sending_dtmf_tv(bridge_channel->chan), "bridge end"); } {noformat} | ||
Comments: |