[asterisk-commits] rmudgett: branch rmudgett/native_dahdi r394434 - /team/rmudgett/native_dahdi/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 15 21:03:34 CDT 2013


Author: rmudgett
Date: Mon Jul 15 21:03:32 2013
New Revision: 394434

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394434
Log:
Fix native DAHDI attended transfers.

Modified:
    team/rmudgett/native_dahdi/channels/dahdi/bridge_native_dahdi.c

Modified: team/rmudgett/native_dahdi/channels/dahdi/bridge_native_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/native_dahdi/channels/dahdi/bridge_native_dahdi.c?view=diff&rev=394434&r1=394433&r2=394434
==============================================================================
--- team/rmudgett/native_dahdi/channels/dahdi/bridge_native_dahdi.c (original)
+++ team/rmudgett/native_dahdi/channels/dahdi/bridge_native_dahdi.c Mon Jul 15 21:03:32 2013
@@ -824,21 +824,37 @@
 
 	/* Recheck native bridging validity. */
 	tech_pvt = bridge->tech_pvt;
-	if (tech_pvt->connected) {
+	switch (frame->frametype) {
+	case AST_FRAME_VOICE:
+	case AST_FRAME_VIDEO:
+		if (!tech_pvt->connected) {
+			/* Don't try to start native mode on media frames. */
+			break;
+		}
 		if (native_bridge_changed(bridge)) {
 			native_request_stop(bridge);
 			native_request_start(bridge);
-		}
-	} else {
-		/* Don't try to start native mode on media frames. */
-		switch (frame->frametype) {
-		case AST_FRAME_VOICE:
-		case AST_FRAME_VIDEO:
-			break;
-		default:
+			if (!tech_pvt->connected) {
+				break;
+			}
+		}
+
+		/*
+		 * Native bridge handles voice frames in hardware.  However, it
+		 * also passes the frames up to Asterisk anyway.  Discard the
+		 * media frames.
+		 */
+		return 0;
+	default:
+		if (!tech_pvt->connected) {
 			native_request_start(bridge);
 			break;
 		}
+		if (native_bridge_changed(bridge)) {
+			native_request_stop(bridge);
+			native_request_start(bridge);
+		}
+		break;
 	}
 
 	return ast_bridge_queue_everyone_else(bridge, bridge_channel, frame);




More information about the asterisk-commits mailing list