[svn-commits] mmichelson: branch mmichelson/atxfer_features r393428 - /team/mmichelson/atxf...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 2 10:55:49 CDT 2013


Author: mmichelson
Date: Tue Jul  2 10:55:48 2013
New Revision: 393428

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393428
Log:
Make sure the transferer has all his features if he gets recalled.


Modified:
    team/mmichelson/atxfer_features/main/bridging_basic.c

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=393428&r1=393427&r2=393428
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Tue Jul  2 10:55:48 2013
@@ -941,6 +941,8 @@
 	char transferer_addr[AST_CHANNEL_NAME];
 	/*! Dial structure used when recalling transferer channel */
 	struct ast_dial *dial;
+	/*! The bridging features the transferer has available */
+	struct ast_flags transferer_features;
 };
 
 static void attended_transfer_properties_destructor(void *obj)
@@ -968,6 +970,7 @@
 	char *addr;
 	char *serial;
 	RAII_VAR(struct ast_features_xfer_config *, xfer_cfg, NULL, ao2_cleanup);
+	struct ast_flags *transferer_features;
 
 	props = ao2_alloc(sizeof(*props), attended_transfer_properties_destructor);
 	if (!props) {
@@ -985,6 +988,10 @@
 	if (!xfer_cfg) {
 		ao2_ref(props, -1);
 		return NULL;
+	}
+	transferer_features = ast_bridge_features_ds_get(props->transferer);
+	if (transferer_features) {
+		props->transferer_features = *transferer_features;
 	}
 	props->atxferdropcall = xfer_cfg->atxferdropcall;
 	props->atxfercallbackretries = xfer_cfg->atxfercallbackretries;
@@ -1637,6 +1644,11 @@
 		}
 		return TRANSFER_RETRANSFER;
 	case STIMULUS_RECALL_TARGET_ANSWER:
+		/* Setting this datastore up will allow the transferer to have all of his
+		 * call features set up automatically when the bridge changes back to a
+		 * normal personality
+		 */
+		ast_bridge_features_ds_set(props->recall_target, &props->transferer_features);
 		ast_bridge_impart(props->transferee_bridge, props->recall_target, NULL, NULL, 1);
 		return TRANSFER_RESUME;
 	case STIMULUS_NONE:




More information about the svn-commits mailing list