[svn-commits] mmichelson: branch mmichelson/features_config r390666 - in /team/mmichelson/f...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 6 09:00:55 CDT 2013


Author: mmichelson
Date: Thu Jun  6 09:00:53 2013
New Revision: 390666

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390666
Log:
Resolve conflict and reset automerge.


Modified:
    team/mmichelson/features_config/   (props changed)
    team/mmichelson/features_config/bridges/bridge_builtin_interval_features.c
    team/mmichelson/features_config/channels/chan_dahdi.c
    team/mmichelson/features_config/include/asterisk/bridging_features.h
    team/mmichelson/features_config/include/asterisk/stasis.h
    team/mmichelson/features_config/main/bridging.c
    team/mmichelson/features_config/main/bridging_basic.c
    team/mmichelson/features_config/main/core_local.c
    team/mmichelson/features_config/main/features.c
    team/mmichelson/features_config/main/manager_channels.c
    team/mmichelson/features_config/res/parking/parking_bridge_features.c

Propchange: team/mmichelson/features_config/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/mmichelson/features_config/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun  6 09:00:53 2013
@@ -1,1 +1,1 @@
-/trunk:1-390522
+/trunk:1-390665

Modified: team/mmichelson/features_config/bridges/bridge_builtin_interval_features.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/bridges/bridge_builtin_interval_features.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/bridges/bridge_builtin_interval_features.c (original)
+++ team/mmichelson/features_config/bridges/bridge_builtin_interval_features.c Thu Jun  6 09:00:53 2013
@@ -146,7 +146,8 @@
 	ast_string_field_set(dst, connect_sound, src->connect_sound);
 }
 
-static int bridge_builtin_set_limits(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, int remove_on_pull)
+static int bridge_builtin_set_limits(struct ast_bridge_features *features,
+		struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_features_limits *feature_limits;
 
@@ -173,7 +174,7 @@
 
 /* BUGBUG feature interval hooks need to be reimplemented to be more stand alone. */
 	if (ast_bridge_interval_hook(features, feature_limits->duration,
-		bridge_features_duration_callback, feature_limits, NULL, remove_on_pull)) {
+		bridge_features_duration_callback, feature_limits, NULL, remove_flags)) {
 		ast_log(LOG_ERROR, "Failed to schedule the duration limiter to the bridge channel.\n");
 		return -1;
 	}
@@ -182,14 +183,14 @@
 
 	if (!ast_strlen_zero(feature_limits->connect_sound)) {
 		if (ast_bridge_interval_hook(features, 1,
-			bridge_features_connect_callback, feature_limits, NULL, remove_on_pull)) {
+			bridge_features_connect_callback, feature_limits, NULL, remove_flags)) {
 			ast_log(LOG_WARNING, "Failed to schedule connect sound to the bridge channel.\n");
 		}
 	}
 
 	if (feature_limits->warning && feature_limits->warning < feature_limits->duration) {
 		if (ast_bridge_interval_hook(features, feature_limits->duration - feature_limits->warning,
-			bridge_features_warning_callback, feature_limits, NULL, remove_on_pull)) {
+			bridge_features_warning_callback, feature_limits, NULL, remove_flags)) {
 			ast_log(LOG_WARNING, "Failed to schedule warning sound playback to the bridge channel.\n");
 		}
 	}

Modified: team/mmichelson/features_config/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/channels/chan_dahdi.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/channels/chan_dahdi.c (original)
+++ team/mmichelson/features_config/channels/chan_dahdi.c Thu Jun  6 09:00:53 2013
@@ -1555,6 +1555,7 @@
 static int dahdi_cc_callback(struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback);
 
 /* BUGBUG The DAHDI channel driver needs its own native bridge technology. */
+/* BUGBUG The transfer=yes option is broken for ISDN to push tromboned calls to the peer. */
 static struct ast_channel_tech dahdi_tech = {
 	.type = "DAHDI",
 	.description = tdesc,

Modified: team/mmichelson/features_config/include/asterisk/bridging_features.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/include/asterisk/bridging_features.h?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/include/asterisk/bridging_features.h (original)
+++ team/mmichelson/features_config/include/asterisk/bridging_features.h Thu Jun  6 09:00:53 2013
@@ -182,7 +182,7 @@
 
 enum ast_bridge_hook_remove_flags {
 	/*! The hook is removed when the channel is pulled from the bridge. */
-	AST_BRIDGE_HOOK_REMOVE_ON_PULL,
+	AST_BRIDGE_HOOK_REMOVE_ON_PULL = (1 << 0),
 };
 
 /* BUGBUG Need to be able to selectively remove DTMF, hangup, and interval hooks. */
@@ -336,12 +336,13 @@
  *
  * \param features Bridge features structure
  * \param limits Configured limits applicable to the channel
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
- *
- * \retval 0 on success
- * \retval -1 on failure
- */
-typedef int (*ast_bridge_builtin_set_limits_fn)(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, int remove_on_pull);
+ * \param remove_flags Dictates what situations the hook should be removed.
+ *
+ * \retval 0 on success
+ * \retval -1 on failure
+ */
+typedef int (*ast_bridge_builtin_set_limits_fn)(struct ast_bridge_features *features,
+		struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Register a handler for a built in interval feature
@@ -388,7 +389,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -409,7 +410,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Attach a bridge channel leave hook to a bridge features structure
@@ -418,7 +419,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -439,7 +440,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Attach a hangup hook to a bridge features structure
@@ -448,7 +449,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -469,7 +470,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Attach a DTMF hook to a bridge features structure
@@ -479,7 +480,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -501,7 +502,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief attach an interval hook to a bridge features structure
@@ -511,7 +512,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -530,7 +531,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Set a callback on the features structure to receive talking notifications on.
@@ -555,7 +556,7 @@
  * \param dtmf Optionally the DTMF stream to trigger the feature, if not specified it will be the default
  * \param config Configuration structure unique to the built in type
  * \param destructor Optional destructor callback for config data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -577,7 +578,7 @@
 	const char *dtmf,
 	void *config,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull);
+	enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Constructor function for ast_bridge_features_limits
@@ -604,7 +605,7 @@
  *
  * \param features Bridge features structure
  * \param limits Configured limits applicable to the channel
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -625,7 +626,7 @@
  * \note This API call can only be used on a features structure that will be used in association with a bridge channel.
  * \note The ast_bridge_features_limits structure must remain accessible for the lifetime of the features structure.
  */
-int ast_bridge_features_set_limits(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, int remove_on_pull);
+int ast_bridge_features_set_limits(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags);
 
 /*!
  * \brief Set a flag on a bridge channel features structure

Modified: team/mmichelson/features_config/include/asterisk/stasis.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/include/asterisk/stasis.h?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/include/asterisk/stasis.h (original)
+++ team/mmichelson/features_config/include/asterisk/stasis.h Thu Jun  6 09:00:53 2013
@@ -605,11 +605,13 @@
 
 /*!
  * \brief Retrieve an item from the cache.
+ *
+ * The returned item is AO2 managed, so ao2_cleanup() when you're done with it.
+ *
  * \param caching_topic The topic returned from stasis_caching_topic_create().
  * \param type Type of message to retrieve.
  * \param id Identity of the snapshot to retrieve.
- * \return Message from the cache. The cache still owns the message, so
- *         ao2_ref() if you want to keep it.
+ * \return Message from the cache.
  * \return \c NULL if message is not found.
  * \since 12
  */

Modified: team/mmichelson/features_config/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/bridging.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/main/bridging.c (original)
+++ team/mmichelson/features_config/main/bridging.c Thu Jun  6 09:00:53 2013
@@ -2032,7 +2032,10 @@
 static void after_bridge_move_channel(struct ast_channel *chan_bridged, void *data)
 {
 	RAII_VAR(struct ast_channel *, chan_target, data, ao2_cleanup);
-	ast_channel_move(chan_target, chan_bridged);
+
+	if (ast_channel_move(chan_target, chan_bridged)) {
+		ast_softhangup(chan_target, AST_SOFTHANGUP_DEV);
+	}
 }
 
 static void after_bridge_move_channel_fail(enum ast_after_bridge_cb_reason reason, void *data)
@@ -2040,7 +2043,8 @@
 	RAII_VAR(struct ast_channel *, chan_target, data, ao2_cleanup);
 
 	ast_log(LOG_WARNING, "Unable to complete transfer: %s\n",
-			ast_after_bridge_cb_reason_string(reason));
+		ast_after_bridge_cb_reason_string(reason));
+	ast_softhangup(chan_target, AST_SOFTHANGUP_DEV);
 }
 
 static void bridge_channel_attended_transfer(struct ast_bridge_channel *bridge_channel,
@@ -2052,21 +2056,22 @@
 	chan_target = ast_channel_get_by_name(target_chan_name);
 	if (!chan_target) {
 		/* Dang, it disappeared somehow */
+		bridge_handle_hangup(bridge_channel);
 		return;
 	}
 
-	{
-		SCOPED_CHANNELLOCK(lock, bridge_channel);
-		chan_bridged = bridge_channel->chan;
-		if (!chan_bridged) {
-			return;
-		}
-		ao2_ref(chan_bridged, +1);
-	}
+	ast_bridge_channel_lock(bridge_channel);
+	chan_bridged = bridge_channel->chan;
+	ast_assert(chan_bridged != NULL);
+	ao2_ref(chan_bridged, +1);
+	ast_bridge_channel_unlock(bridge_channel);
 
 	if (ast_after_bridge_callback_set(chan_bridged, after_bridge_move_channel,
-			after_bridge_move_channel_fail, ast_channel_ref(chan_target))) {
-		return;
+		after_bridge_move_channel_fail, ast_channel_ref(chan_target))) {
+		ast_softhangup(chan_target, AST_SOFTHANGUP_DEV);
+
+		/* Release the ref we tried to pass to ast_after_bridge_callback_set(). */
+		ast_channel_unref(chan_target);
 	}
 	bridge_handle_hangup(bridge_channel);
 }
@@ -4384,7 +4389,7 @@
  * \param callback Function to execute upon activation
  * \param hook_pvt Unique data
  * \param destructor Optional destructor callback for hook_pvt data
- * \param remove_on_pull TRUE if remove the hook when the channel is pulled from the bridge.
+ * \param remove_flags Dictates what situations the hook should be removed.
  *
  * \retval hook on success.
  * \retval NULL on error.
@@ -4393,7 +4398,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 
@@ -4403,7 +4408,7 @@
 		hook->callback = callback;
 		hook->destructor = destructor;
 		hook->hook_pvt = hook_pvt;
-		ast_set_flag(&hook->remove_flags, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
+		ast_set_flag(&hook->remove_flags, remove_flags);
 	}
 
 	return hook;
@@ -4414,14 +4419,14 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int res;
 
 	/* Allocate new hook and setup it's various variables */
 	hook = bridge_hook_generic(sizeof(*hook), callback, hook_pvt, destructor,
-		remove_on_pull);
+		remove_flags);
 	if (!hook) {
 		return -1;
 	}
@@ -4438,14 +4443,14 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int res;
 
 	/* Allocate new hook and setup it's various variables */
 	hook = bridge_hook_generic(sizeof(*hook), callback, hook_pvt, destructor,
-		remove_on_pull);
+		remove_flags);
 	if (!hook) {
 		return -1;
 	}
@@ -4461,14 +4466,14 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int res;
 
 	/* Allocate new hook and setup it's various variables */
 	hook = bridge_hook_generic(sizeof(*hook), callback, hook_pvt, destructor,
-		remove_on_pull);
+		remove_flags);
 	if (!hook) {
 		return -1;
 	}
@@ -4484,14 +4489,14 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int res;
 
 	/* Allocate new hook and setup it's various variables */
 	hook = bridge_hook_generic(sizeof(*hook), callback, hook_pvt, destructor,
-		remove_on_pull);
+		remove_flags);
 	if (!hook) {
 		return -1;
 	}
@@ -4518,7 +4523,7 @@
 	ast_bridge_hook_callback callback,
 	void *hook_pvt,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	struct ast_bridge_hook *hook;
 	int res;
@@ -4537,7 +4542,7 @@
 
 	/* Allocate new hook and setup it's various variables */
 	hook = bridge_hook_generic(sizeof(*hook), callback, hook_pvt, destructor,
-		remove_on_pull);
+		remove_flags);
 	if (!hook) {
 		return -1;
 	}
@@ -4563,7 +4568,7 @@
 	const char *dtmf,
 	void *config,
 	ast_bridge_hook_pvt_destructor destructor,
-	int remove_on_pull)
+	enum ast_bridge_hook_remove_flags remove_flags)
 {
 	if (ARRAY_LEN(builtin_features_handlers) <= feature
 		|| !builtin_features_handlers[feature]) {
@@ -4586,7 +4591,7 @@
 	 * using the built in feature's DTMF callback.  Easy as pie.
 	 */
 	return ast_bridge_dtmf_hook(features, dtmf, builtin_features_handlers[feature],
-		config, destructor, remove_on_pull);
+		config, destructor, remove_flags);
 }
 
 int ast_bridge_features_limits_construct(struct ast_bridge_features_limits *limits)
@@ -4606,13 +4611,14 @@
 	ast_string_field_free_memory(limits);
 }
 
-int ast_bridge_features_set_limits(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, int remove_on_pull)
+int ast_bridge_features_set_limits(struct ast_bridge_features *features,
+		struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags)
 {
 	if (builtin_interval_handlers[AST_BRIDGE_BUILTIN_INTERVAL_LIMITS]) {
 		ast_bridge_builtin_set_limits_fn bridge_features_set_limits_callback;
 
 		bridge_features_set_limits_callback = builtin_interval_handlers[AST_BRIDGE_BUILTIN_INTERVAL_LIMITS];
-		return bridge_features_set_limits_callback(features, limits, remove_on_pull);
+		return bridge_features_set_limits_callback(features, limits, remove_flags);
 	}
 
 	ast_log(LOG_ERROR, "Attempted to set limits without an AST_BRIDGE_BUILTIN_INTERVAL_LIMITS callback registered.\n");
@@ -4627,7 +4633,7 @@
 
 /*!
  * \internal
- * \brief ao2 object match remove_on_pull hooks.
+ * \brief ao2 object match hooks with appropriate remove_flags.
  * \since 12.0.0
  *
  * \param obj Feature hook object.
@@ -4651,7 +4657,7 @@
 
 /*!
  * \internal
- * \brief Remove all remove_on_pull hooks in the container.
+ * \brief Remove all hooks with appropriate remove_flags in the container.
  * \since 12.0.0
  *
  * \param hooks Hooks container to work on.
@@ -4667,7 +4673,7 @@
 
 /*!
  * \internal
- * \brief Remove all remove_on_pull hooks in the heap.
+ * \brief Remove all hooks in the heap with appropriate remove_flags set.
  * \since 12.0.0
  *
  * \param hooks Hooks heap to work on.
@@ -5374,11 +5380,11 @@
 	}
 
 	ast_copy_string(unbridged_chan_name, ast_channel_name(unbridged_chan),
-			sizeof(unbridged_chan_name));
+		sizeof(unbridged_chan_name));
 
 	ast_bridge_channel_queue_action_data(transferee_bridge_channel,
-			AST_BRIDGE_ACTION_ATTENDED_TRANSFER, unbridged_chan_name,
-			sizeof(unbridged_chan_name));
+		AST_BRIDGE_ACTION_ATTENDED_TRANSFER, unbridged_chan_name,
+		sizeof(unbridged_chan_name));
 
 	return 0;
 }
@@ -5513,6 +5519,7 @@
 
 	{
 		SCOPED_LOCK(lock, bridge, ast_bridge_lock, ast_bridge_unlock);
+
 		channels = ast_bridge_peers_nolock(bridge);
 		if (!channels) {
 			return AST_BRIDGE_TRANSFER_FAIL;
@@ -5575,11 +5582,17 @@
 	struct ast_bridge_channel *bridged_to_source;
 
 	bridged_to_source = ast_bridge_channel_peer(source_bridge_channel);
-	if (bridged_to_source && bridged_to_source->state == AST_BRIDGE_CHANNEL_STATE_WAIT
-			&& !ast_test_flag(&bridged_to_source->features->feature_flags, AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE)) {
+	if (bridged_to_source
+		&& bridged_to_source->state == AST_BRIDGE_CHANNEL_STATE_WAIT
+		&& !ast_test_flag(&bridged_to_source->features->feature_flags,
+			AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE)) {
 		bridged_to_source->swap = swap_channel;
-		return bridge_move_do(dest_bridge, bridged_to_source, 1) ?
-			AST_BRIDGE_TRANSFER_FAIL : AST_BRIDGE_TRANSFER_SUCCESS;
+		if (bridge_move_do(dest_bridge, bridged_to_source, 1)) {
+			return AST_BRIDGE_TRANSFER_FAIL;
+		}
+		/* Must kick the source channel out of its bridge. */
+		ast_bridge_change_state(source_bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
+		return AST_BRIDGE_TRANSFER_SUCCESS;
 	} else {
 		return AST_BRIDGE_TRANSFER_INVALID;
 	}

Modified: team/mmichelson/features_config/main/bridging_basic.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/bridging_basic.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/main/bridging_basic.c (original)
+++ team/mmichelson/features_config/main/bridging_basic.c Thu Jun  6 09:00:53 2013
@@ -126,7 +126,7 @@
  */
 static int bridge_basic_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
 {
-	if (ast_bridge_hangup_hook(bridge_channel->features, basic_hangup_hook, NULL, NULL, 1)
+	if (ast_bridge_hangup_hook(bridge_channel->features, basic_hangup_hook, NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL)
 		|| ast_bridge_channel_setup_features(bridge_channel)) {
 		return -1;
 	}

Modified: team/mmichelson/features_config/main/core_local.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/core_local.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/main/core_local.c (original)
+++ team/mmichelson/features_config/main/core_local.c Thu Jun  6 09:00:53 2013
@@ -445,9 +445,8 @@
 	case LOCAL_CALL_ACTION_MASQUERADE:
 		local_bridge_event(p);
 		ast_answer(chan);
-		res = ast_channel_masquerade(p->action.masq, chan);
+		res = ast_channel_move(p->action.masq, chan);
 		if (!res) {
-			ast_do_masquerade(p->action.masq);
 			/* Chan is now an orphaned zombie.  Destroy it. */
 			ast_hangup(chan);
 		}

Modified: team/mmichelson/features_config/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/features.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/main/features.c (original)
+++ team/mmichelson/features_config/main/features.c Thu Jun  6 09:00:53 2013
@@ -3246,33 +3246,39 @@
 				&& !ast_strlen_zero(dtmf)) {
 		/* Add atxfer and blind transfer. */
 /* BUGBUG need to supply a blind transfer structure and destructor to use other than defaults */
-			res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_BLINDTRANSFER, dtmf, NULL, NULL, 1);
+			res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_BLINDTRANSFER, dtmf,
+					NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
 		}
 		if (!builtin_feature_get_exten(chan, "atxfer", dtmf, sizeof(dtmf)) &&
 				!ast_strlen_zero(dtmf)) {
 /* BUGBUG need to supply an attended transfer structure and destructor to use other than defaults */
-			res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_ATTENDEDTRANSFER, dtmf, NULL, NULL, 1);
+			res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_ATTENDEDTRANSFER, dtmf,
+					NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL);
 		}
 	}
 	if (ast_test_flag(flags, AST_FEATURE_DISCONNECT) &&
 			!builtin_feature_get_exten(chan, "disconnect", dtmf, sizeof(dtmf)) &&
 			!ast_strlen_zero(dtmf)) {
-		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_HANGUP, dtmf, NULL, NULL, 1);
+		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_HANGUP, dtmf,
+				NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
 	}
 	if (ast_test_flag(flags, AST_FEATURE_PARKCALL) &&
 			!builtin_feature_get_exten(chan, "parkcall", dtmf, sizeof(dtmf)) &&
 			!ast_strlen_zero(dtmf)) {
-		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_PARKCALL, dtmf, NULL, NULL, 1);
+		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_PARKCALL, dtmf,
+				NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
 	}
 	if (ast_test_flag(flags, AST_FEATURE_AUTOMON) &&
 			!builtin_feature_get_exten(chan, "automon", dtmf, sizeof(dtmf)) &&
 			!ast_strlen_zero(dtmf)) {
-		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMON, dtmf, NULL, NULL, 1);
+		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMON, dtmf,
+				NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
 	}
 	if (ast_test_flag(flags, AST_FEATURE_AUTOMIXMON) &&
 			!builtin_feature_get_exten(chan, "automixmon", dtmf, sizeof(dtmf)) &&
 			!ast_strlen_zero(dtmf)) {
-		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMIXMON, dtmf, NULL, NULL, 1);
+		res |= ast_bridge_features_enable(features, AST_BRIDGE_BUILTIN_AUTOMIXMON, dtmf,
+				NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL1);
 	}
 
 #if 0	/* BUGBUG don't report errors untill all of the builtin features are supported. */

Modified: team/mmichelson/features_config/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/main/manager_channels.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/main/manager_channels.c (original)
+++ team/mmichelson/features_config/main/manager_channels.c Thu Jun  6 09:00:53 2013
@@ -859,7 +859,7 @@
 		struct stasis_topic *topic, struct stasis_message *message)
 {
 	RAII_VAR(struct ast_str *, spyer_channel_string, NULL, ast_free);
-	RAII_VAR(struct ast_channel_snapshot *, spyer, NULL, ao2_cleanup);
+	struct ast_channel_snapshot *spyer;
 	struct ast_multi_channel_blob *payload = stasis_message_data(message);
 
 	spyer = ast_multi_channel_blob_get_channel(payload, "spyer_channel");
@@ -883,8 +883,8 @@
 {
 	RAII_VAR(struct ast_str *, spyer_channel_string, NULL, ast_free);
 	RAII_VAR(struct ast_str *, spyee_channel_string, NULL, ast_free);
-	RAII_VAR(struct ast_channel_snapshot *, spyer, NULL, ao2_cleanup);
-	RAII_VAR(struct ast_channel_snapshot *, spyee, NULL, ao2_cleanup);
+	struct ast_channel_snapshot *spyer;
+	struct ast_channel_snapshot *spyee;
 	struct ast_multi_channel_blob *payload = stasis_message_data(message);
 
 	spyer = ast_multi_channel_blob_get_channel(payload, "spyer_channel");

Modified: team/mmichelson/features_config/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/res/parking/parking_bridge_features.c?view=diff&rev=390666&r1=390665&r2=390666
==============================================================================
--- team/mmichelson/features_config/res/parking/parking_bridge_features.c (original)
+++ team/mmichelson/features_config/res/parking/parking_bridge_features.c Thu Jun  6 09:00:53 2013
@@ -458,7 +458,7 @@
 	ao2_ref(user, +1);
 
 	if (ast_bridge_interval_hook(features, time_limit,
-		parking_duration_callback, user, parking_duration_cb_destroyer, 1)) {
+		parking_duration_callback, user, parking_duration_cb_destroyer, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
 		ast_log(LOG_ERROR, "Failed to apply duration limits to the parking call.\n");
 	}
 }




More information about the svn-commits mailing list