[asterisk-commits] rmudgett: branch rmudgett/bridge_phase r384104 - /team/rmudgett/bridge_phase/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 27 13:20:50 CDT 2013


Author: rmudgett
Date: Wed Mar 27 13:20:47 2013
New Revision: 384104

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=384104
Log:
* Add more notes.

* Defer DTMF frames on outgoing bridge channel queue.

Modified:
    team/rmudgett/bridge_phase/main/bridging.c

Modified: team/rmudgett/bridge_phase/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/main/bridging.c?view=diff&rev=384104&r1=384103&r2=384104
==============================================================================
--- team/rmudgett/bridge_phase/main/bridging.c (original)
+++ team/rmudgett/bridge_phase/main/bridging.c Wed Mar 27 13:20:47 2013
@@ -296,7 +296,11 @@
 	struct ast_frame *dup;
 	char nudge = 0;
 
-	if (bridge_channel->suspended && !ast_is_deferrable_frame(fr)) {
+	if (bridge_channel->suspended
+		/* Also defer DTMF frames. */
+		&& fr->frametype != AST_FRAME_DTMF_BEGIN
+		&& fr->frametype != AST_FRAME_DTMF_END
+		&& !ast_is_deferrable_frame(fr)) {
 		/* Drop non-deferable frames when suspended. */
 		return 0;
 	}
@@ -389,6 +393,8 @@
 	ast_debug(1, "Pulling bridge channel %p(%s) from bridge %p\n",
 		bridge_channel, ast_channel_name(bridge_channel->chan), bridge);
 
+/* 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, "Giving bridge technology %s notification that %p(%s) is leaving bridge %p\n",
@@ -654,10 +660,14 @@
 		ast_frfree(frame);
 		return;
 	case AST_FRAME_CONTROL:
-		if (frame->subclass.integer == AST_CONTROL_HANGUP) {
+		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:
@@ -671,6 +681,7 @@
 			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. */
 		break;
 	default:
 		break;
@@ -680,6 +691,8 @@
 
 	/* Simply write the frame out to the bridge technology. */
 	ast_bridge_channel_lock_bridge(bridge_channel);
+/* BUGBUG The tech is where AST_CONTROL_ANSWER hook should go. (early bridge) */
+/* BUGBUG The tech is where incoming BUSY/CONGESTION hangup should happen? (early bridge) */
 	bridge_channel->bridge->technology->write(bridge_channel->bridge, bridge_channel, frame);
 	ast_bridge_unlock(bridge_channel->bridge);
 	ast_frfree(frame);
@@ -1939,6 +1952,7 @@
 	ast_bridge_channel_unlock(bridge_channel);
 
 /* BUGBUG Revisit in regards to moving channels between bridges and local channel optimization. */
+/* 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,




More information about the asterisk-commits mailing list