[asterisk-commits] mmichelson: branch mmichelson/atxfer_features r392951 - /team/mmichelson/atxf...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 26 09:19:41 CDT 2013


Author: mmichelson
Date: Wed Jun 26 09:19:39 2013
New Revision: 392951

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392951
Log:
Get rid of a XXX comment in the COMPLETE state.

There was a concern about sending an UNHOLD to a bridge
after a merge since either of the individual bridges may have
been simple bridges, but the merge may have resulted in the
bridge being a multimix bridge. If an UNHOLD is sent to a multimix
bridge, then the frame will not be passed to the channels.

This is corrected by performing the unhold before entering the
COMPLETE state. Since there are separate states depending on
what bridge the transferer is in prior to the COMPLETE state, this
makes things very simple.


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=392951&r1=392950&r2=392951
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Wed Jun 26 09:19:39 2013
@@ -712,15 +712,17 @@
 		return TRANSFER_FAIL;
 	case STIMULUS_TRANSFERER_HANGUP:
 	case STIMULUS_DTMF_ATXFER_COMPLETE:
-		 return TRANSFER_COMPLETE;
+		/* We know the transferer is in the target_bridge, so take the other bridge off hold */
+		bridge_unhold(props->transferee_bridge);
+		return TRANSFER_COMPLETE;
 	case STIMULUS_TARGET_HANGUP:
 	case STIMULUS_DTMF_ATXFER_ABORT:
-		 return TRANSFER_REBRIDGE;
+		return TRANSFER_REBRIDGE;
 	case STIMULUS_DTMF_ATXFER_THREEWAY:
-		 return TRANSFER_THREEWAY;
+		return TRANSFER_THREEWAY;
 	case STIMULUS_DTMF_ATXFER_SWAP:
 		 hold(props->transferer);
-		 return TRANSFER_DOUBLECHECKING;
+		return TRANSFER_DOUBLECHECKING;
 	}
 }
 
@@ -758,15 +760,17 @@
 		return TRANSFER_FAIL;
 	case STIMULUS_TRANSFERER_HANGUP:
 	case STIMULUS_DTMF_ATXFER_COMPLETE:
-		 return TRANSFER_COMPLETE;
+		/* We know the transferer is in the transferee, so take the other bridge off hold */
+		bridge_unhold(props->target_bridge);
+		return TRANSFER_COMPLETE;
 	case STIMULUS_TARGET_HANGUP:
 	case STIMULUS_DTMF_ATXFER_ABORT:
-		 return TRANSFER_RESUME;
+		return TRANSFER_RESUME;
 	case STIMULUS_DTMF_ATXFER_THREEWAY:
-		 return TRANSFER_THREEWAY;
+		return TRANSFER_THREEWAY;
 	case STIMULUS_DTMF_ATXFER_SWAP:
-		 hold(props->transferer);
-		 return TRANSFER_CONSULTING;
+		hold(props->transferer);
+		return TRANSFER_CONSULTING;
 	}
 }
 
@@ -776,13 +780,6 @@
 		bridge_merge(props->transferee_bridge, props->target_bridge, &props->transferer, 1);
 	} else {
 		bridge_merge(props->transferee_bridge, props->target_bridge, NULL, 0);
-	}
-
-	/* XXX Same unhold concern here as in the threeway state. However, there
-	 * is no guarantee here that the resulting bridge's technology will be.
-	 */
-	if (props->transferer) {
-		bridge_unhold(props->transferee_bridge);
 	}
 
 	return 0;




More information about the asterisk-commits mailing list