[asterisk-commits] oej: branch oej/pinedanish-copybridgeflags-1.6.0 r305744 - in /team/oej/pined...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 2 04:50:16 CST 2011


Author: oej
Date: Wed Feb  2 04:50:12 2011
New Revision: 305744

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=305744
Log:
Minor updates. This code actually works. Wow.

Modified:
    team/oej/pinedanish-copybridgeflags-1.6.0/channels/chan_local.c
    team/oej/pinedanish-copybridgeflags-1.6.0/main/features.c

Modified: team/oej/pinedanish-copybridgeflags-1.6.0/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinedanish-copybridgeflags-1.6.0/channels/chan_local.c?view=diff&rev=305744&r1=305743&r2=305744
==============================================================================
--- team/oej/pinedanish-copybridgeflags-1.6.0/channels/chan_local.c (original)
+++ team/oej/pinedanish-copybridgeflags-1.6.0/channels/chan_local.c Wed Feb  2 04:50:12 2011
@@ -220,6 +220,10 @@
 	if (other) {
 		if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_RINGING) {
 			ast_setstate(other, AST_STATE_RINGING);
+		}
+		if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_BRIDGEPARAM) {
+			if (option_debug > 1)
+				ast_log(LOG_DEBUG, "---> BRIDGE CONTROL packet aimed for %s\n", other->name);
 		}
 		ast_queue_frame(other, f);
 		ast_channel_unlock(other);
@@ -327,7 +331,8 @@
 	ast_mutex_lock(&p->lock);
 	isoutbound = IS_OUTBOUND(ast, p);
 	if (f && f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_BRIDGEPARAM) {
-		ast_log(LOG_DEBUG, "--- Bridge parameters shipped along ... \n");
+		if (option_debug > 1)
+			ast_log(LOG_DEBUG, "--- Bridge parameters shipped along ... \n");
 	}
 	if (isoutbound && f && (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_VIDEO))
 		check_bridge(p);

Modified: team/oej/pinedanish-copybridgeflags-1.6.0/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinedanish-copybridgeflags-1.6.0/main/features.c?view=diff&rev=305744&r1=305743&r2=305744
==============================================================================
--- team/oej/pinedanish-copybridgeflags-1.6.0/main/features.c (original)
+++ team/oej/pinedanish-copybridgeflags-1.6.0/main/features.c Wed Feb  2 04:50:12 2011
@@ -2458,17 +2458,26 @@
 				
 				if (ast_test_flag(param, AST_FEATURE_REDIRECT)) {
                                 	ast_set_flag(&(config->features_callee), AST_FEATURE_REDIRECT);
-					ast_debug(2, "--- Setting Transfer flag on callee in bridge! \n");
+					ast_debug(2, "--- Setting Transfer flag on callee in bridge! Chan %s Peer %s \n", chan->name, peer->name);
 					hasfeatures = 1;
+					ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_1);
 				}
-				if (ast_test_flag(param, AST_FEATURE_DISCONNECT))
+				if (ast_test_flag(param, AST_FEATURE_DISCONNECT)) {
                                 	ast_set_flag(&(config->features_callee), AST_FEATURE_DISCONNECT);
-				if (ast_test_flag(param, AST_FEATURE_AUTOMON))
+					ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_1);
+				}
+				if (ast_test_flag(param, AST_FEATURE_AUTOMON)) {
                                 	ast_set_flag(&(config->features_callee), AST_FEATURE_AUTOMON);
-				if (ast_test_flag(param, AST_FEATURE_AUTOMIXMON))
+					ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_1);
+				}
+				if (ast_test_flag(param, AST_FEATURE_AUTOMIXMON)) {
                                 	ast_set_flag(&(config->features_callee), AST_FEATURE_AUTOMIXMON);
-				if (ast_test_flag(param, AST_FEATURE_PARKCALL))
+					ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_1);
+				}
+				if (ast_test_flag(param, AST_FEATURE_PARKCALL)) {
                                 	ast_set_flag(&(config->features_callee), AST_FEATURE_PARKCALL);
+					ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_1);
+				}
 				ast_debug(2, "--- Setting updated bridge flags from chan_local in this bridge for outgoing channel %s Peer %s\n", chan->name, peer->name);
 				break;
 			case AST_CONTROL_OPTION:




More information about the asterisk-commits mailing list