[svn-commits] mmichelson: branch mmichelson/atxfer_features r393828 - in /team/mmichelson/a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 8 13:24:46 CDT 2013


Author: mmichelson
Date: Mon Jul  8 13:24:43 2013
New Revision: 393828

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393828
Log:
Address review feedback:

* Change bridging_private.h to bridging_internal.h
* Remove copious red blobs
* Check for existing bridge merge inhibition prior to performing attended transfer.


Added:
    team/mmichelson/atxfer_features/include/asterisk/bridging_internal.h
      - copied unchanged from r393824, team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
Removed:
    team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
Modified:
    team/mmichelson/atxfer_features/main/bridging.c
    team/mmichelson/atxfer_features/main/bridging_basic.c
    team/mmichelson/atxfer_features/main/stasis_bridging.c

Modified: team/mmichelson/atxfer_features/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging.c?view=diff&rev=393828&r1=393827&r2=393828
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging.c (original)
+++ team/mmichelson/atxfer_features/main/bridging.c Mon Jul  8 13:24:43 2013
@@ -63,7 +63,7 @@
 #include "asterisk/core_local.h"
 #include "asterisk/core_unreal.h"
 #include "asterisk/features_config.h"
-#include "asterisk/bridging_private.h"
+#include "asterisk/bridging_internal.h"
 
 /*! All bridges container. */
 static struct ao2_container *bridges;

Modified: team/mmichelson/atxfer_features/main/bridging_basic.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging_basic.c?view=diff&rev=393828&r1=393827&r2=393828
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Mon Jul  8 13:24:43 2013
@@ -41,7 +41,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/file.h"
 #include "asterisk/app.h"
-#include "asterisk/bridging_private.h"
+#include "asterisk/bridging_internal.h"
 #include "asterisk/dial.h"
 #include "asterisk/stasis_bridging.h"
 
@@ -49,7 +49,7 @@
 			| AST_BRIDGE_FLAG_SMART
 
 #define TRANSFER_FLAGS AST_BRIDGE_FLAG_SMART
-#define TRANSFERER_ROLE_NAME "transferer" 
+#define TRANSFERER_ROLE_NAME "transferer"
 
 struct attended_transfer_properties;
 
@@ -235,7 +235,7 @@
 	 * The attended transfer state machine begins in this superstate. The
 	 * goal of this state is for a transferer channel to facilitate a
 	 * transfer from a transferee to a transfer target.
-	 * 
+	 *
 	 * There are two bridges used in this superstate. The transferee bridge is
 	 * the bridge that the transferer and transferee channels originally
 	 * communicate in, and the target bridge is the bridge where the transfer
@@ -546,7 +546,7 @@
 	 * this state is entered when atxferdropcall is set to 'no'. This is the
 	 * initial state of the Recall superstate, so state operations mainly involve
 	 * moving to the Recall superstate. This means that the transfer target, that
-	 * is currently ringing is now known as the recall target. 
+	 * is currently ringing is now known as the recall target.
 	 *
 	 * Superstate: Recall
 	 *
@@ -912,7 +912,7 @@
 	if (!props) {
 		return NULL;
 	}
-	
+
 	ast_mutex_init(&props->lock);
 	ast_cond_init(&props->cond, NULL);
 
@@ -1110,7 +1110,7 @@
 		ast_channel_lock(chan);
 		bridge_channel = ast_channel_get_bridge_channel(chan);
 		ast_channel_unlock(chan);
-		
+
 		ast_assert(bridge_channel != NULL);
 
 		ast_bridge_channel_write_hold(bridge_channel, NULL);
@@ -1127,7 +1127,7 @@
 	ast_channel_lock(chan);
 	bridge_channel = ast_channel_get_bridge_channel(chan);
 	ast_channel_unlock(chan);
-	
+
 	ast_assert(bridge_channel != NULL);
 
 	ast_bridge_channel_write_unhold(bridge_channel);
@@ -1143,7 +1143,7 @@
 	ast_channel_lock(chan);
 	bridge_channel = ast_channel_get_bridge_channel(chan);
 	ast_channel_unlock(chan);
-	
+
 	ast_assert(bridge_channel != NULL);
 
 	ast_bridge_channel_write_control_data(bridge_channel, AST_CONTROL_RINGING, NULL, 0);
@@ -1832,7 +1832,7 @@
 	struct ast_format fmt;
 	char destination[AST_MAX_EXTENSION + AST_MAX_CONTEXT + 2];
 	int cause;
-	
+
 	if (!cap) {
 		return -1;
 	}
@@ -2074,22 +2074,22 @@
 	swap_dtmf = ast_channel_get_role_option(bridge_channel->chan, TRANSFERER_ROLE_NAME, "swap");
 
 	if (!ast_strlen_zero(abort_dtmf) && ast_bridge_dtmf_hook(bridge_channel->features,
-				abort_dtmf, atxfer_abort, personality->pvt, NULL, 
+				abort_dtmf, atxfer_abort, personality->pvt, NULL,
 				AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE | AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
 		return -1;
 	}
 	if (!ast_strlen_zero(complete_dtmf) && ast_bridge_dtmf_hook(bridge_channel->features,
-				complete_dtmf, atxfer_complete, personality->pvt, NULL, 
+				complete_dtmf, atxfer_complete, personality->pvt, NULL,
 				AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE | AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
 		return -1;
 	}
 	if (!ast_strlen_zero(threeway_dtmf) && ast_bridge_dtmf_hook(bridge_channel->features,
-				threeway_dtmf, atxfer_threeway, personality->pvt, NULL, 
+				threeway_dtmf, atxfer_threeway, personality->pvt, NULL,
 				AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE | AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
 		return -1;
 	}
 	if (!ast_strlen_zero(swap_dtmf) && ast_bridge_dtmf_hook(bridge_channel->features,
-				swap_dtmf, atxfer_swap, personality->pvt, NULL, 
+				swap_dtmf, atxfer_swap, personality->pvt, NULL,
 				AST_BRIDGE_HOOK_REMOVE_ON_PERSONALITY_CHANGE | AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
 		return -1;
 	}
@@ -2263,7 +2263,7 @@
 		stimulus = wait_for_stimulus(props);
 
 		ast_debug(1, "Received stimulus %s on attended transfer %p\n", stimulus_strs[stimulus], props);
-		
+
 		ast_assert(state_properties[props->state].exit != NULL);
 
 		props->state = state_properties[props->state].exit(props, stimulus);
@@ -2436,6 +2436,11 @@
 	char destination[AST_MAX_EXTENSION + AST_MAX_CONTEXT + 1];
 	pthread_t thread;
 
+	if (bridge->inhibit_merge) {
+		ast_log(LOG_ERROR, "Unable to perform attended transfer since bridge '%s' does not permit merging.\n", bridge->uniqueid);
+		return 0;
+	}
+
 	props = attended_transfer_properties_alloc(bridge, bridge_channel->chan,
 			attended_transfer ? attended_transfer->context : NULL);
 
@@ -2721,7 +2726,7 @@
 	personality_normal_v_table = ast_bridge_base_v_table;
 	personality_normal_v_table.name = "normal";
 	personality_normal_v_table.push = bridge_personality_normal_push;
-	
+
 	personality_atxfer_v_table = ast_bridge_base_v_table;
 	personality_atxfer_v_table.name = "attended transfer";
 	personality_atxfer_v_table.push = bridge_personality_atxfer_push;

Modified: team/mmichelson/atxfer_features/main/stasis_bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/stasis_bridging.c?view=diff&rev=393828&r1=393827&r2=393828
==============================================================================
--- team/mmichelson/atxfer_features/main/stasis_bridging.c (original)
+++ team/mmichelson/atxfer_features/main/stasis_bridging.c Mon Jul  8 13:24:43 2013
@@ -335,7 +335,7 @@
 					<note><para>This header is only present when <replaceable>DestType</replaceable> is <literal>Link</literal></para></note>
 				</parameter>
 				<parameter name="DestTransfererChannel">
-					<para>The surviving transferer channel when a transfer results in a threeway call</para>
+					<para>The name of the surviving transferer channel when a transfer results in a threeway call</para>
 					<note><para>This header is only present when <replaceable>DestType</replaceable> is <literal>Threeway</literal></para></note>
 				</parameter>
 			</syntax>




More information about the svn-commits mailing list