[svn-commits] rmudgett: branch rmudgett/bridge_phase r398801 - in /team/rmudgett/bridge_pha...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 10 17:11:58 CDT 2013


Author: rmudgett
Date: Tue Sep 10 17:11:56 2013
New Revision: 398801

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398801
Log:
Make the bridging system honor the 'I' option of Dial, Queue, and FollowMe applications.

Since the Dial, Queue, and FollowMe applications are the only callers of
ast_bridge_call() and ast_bridge_call_with_flags(), change the calling
contract to require the initial COLP exchange to have already been done if
desired.

Testing of this comes next.

Modified:
    team/rmudgett/bridge_phase/include/asterisk/features.h
    team/rmudgett/bridge_phase/main/features.c

Modified: team/rmudgett/bridge_phase/include/asterisk/features.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/include/asterisk/features.h?view=diff&rev=398801&r1=398800&r2=398801
==============================================================================
--- team/rmudgett/bridge_phase/include/asterisk/features.h (original)
+++ team/rmudgett/bridge_phase/include/asterisk/features.h Tue Sep 10 17:11:56 2013
@@ -39,8 +39,14 @@
 	AST_FEATURE_FLAG_BYBOTH	 =   (3 << 3),
 };
 
-/*! \brief Bridge a call, optionally allowing redirection */
-int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct ast_bridge_config *config);
+/*!
+ * \brief Bridge a call, optionally allowing redirection
+ *
+ * \note The function caller is assumed to have already done the
+ * COLP exchange for the initial bridging of the two channels if
+ * it was desired.
+ */
+int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config);
 
 /*!
  * \brief Bridge a call, and add additional flags to the bridge
@@ -53,6 +59,10 @@
  * \param peer The called channel
  * \param config Bridge configuration for the channels
  * \param flags Additional flags to set on the created bridge
+ *
+ * \note The function caller is assumed to have already done the
+ * COLP exchange for the initial bridging of the two channels if
+ * it was desired.
  */
 int ast_bridge_call_with_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, unsigned int flags);
 

Modified: team/rmudgett/bridge_phase/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/main/features.c?view=diff&rev=398801&r1=398800&r2=398801
==============================================================================
--- team/rmudgett/bridge_phase/main/features.c (original)
+++ team/rmudgett/bridge_phase/main/features.c Tue Sep 10 17:11:56 2013
@@ -675,7 +675,8 @@
 	ast_bridge_basic_set_flags(bridge, flags);
 
 	/* Put peer into the bridge */
-	if (ast_bridge_impart(bridge, peer, NULL, peer_features, AST_BRIDGE_IMPART_INDEPENDENT)) {
+	if (ast_bridge_impart(bridge, peer, NULL, peer_features,
+		AST_BRIDGE_IMPART_INDEPENDENT | AST_BRIDGE_IMPART_INHIBIT_JOIN_COLP)) {
 		ast_bridge_destroy(bridge, 0);
 		ast_bridge_features_cleanup(&chan_features);
 		bridge_failed_peer_goto(chan, peer);
@@ -684,7 +685,7 @@
 
 	/* Join bridge */
 	ast_bridge_join(bridge, chan, NULL, &chan_features, NULL,
-		AST_BRIDGE_JOIN_PASS_REFERENCE);
+		AST_BRIDGE_JOIN_PASS_REFERENCE | AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP);
 
 	/*
 	 * If the bridge was broken for a hangup that isn't real, then




More information about the svn-commits mailing list