[svn-commits] rmudgett: branch rmudgett/parking r331245 - /team/rmudgett/parking/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Aug 9 13:26:55 CDT 2011


Author: rmudgett
Date: Tue Aug  9 13:26:51 2011
New Revision: 331245

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331245
Log:
Fixed retrieving parked call connected line update.

Modified:
    team/rmudgett/parking/main/features.c

Modified: team/rmudgett/parking/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/parking/main/features.c?view=diff&rev=331245&r1=331244&r2=331245
==============================================================================
--- team/rmudgett/parking/main/features.c (original)
+++ team/rmudgett/parking/main/features.c Tue Aug  9 13:26:51 2011
@@ -1398,7 +1398,6 @@
 	 */
 	pu->options_specified = (!ast_strlen_zero(args->return_con) || !ast_strlen_zero(args->return_ext) || args->return_pri);
 
-/* BUGBUG this may be what we need to save here to use when the parked call is retrieved. */
 	/*
 	 * If extension has options specified, they override all other
 	 * possibilities such as the returntoorigin flag and transferred
@@ -4874,7 +4873,6 @@
 	}
 	AST_LIST_UNLOCK(&parkinglot->parkings);
 
-/* BUGBUG updating connected line for parked calls could be considered a feature enhancement or bug. */
 	if (peer) {
 		/* Update connected line between retrieving call and parked call. */
 		struct ast_party_connected_line connected;
@@ -4886,14 +4884,22 @@
 		ast_connected_line_copy_from_caller(&connected, &chan->caller);
 		ast_channel_unlock(chan);
 		connected.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-		ast_channel_queue_connected_line_update(chan, &connected, NULL);
-
-		/* Get caller-id from peer. */
+		if (ast_channel_connected_line_macro(chan, peer, &connected, 0, 0)) {
+			ast_channel_update_connected_line(peer, &connected, NULL);
+		}
+
+		/*
+		 * Get caller-id from peer.
+		 *
+		 * Update the retrieving call before it is answered if possible
+		 * for best results.  Some phones do not support updating the
+		 * connected line information after connection.
+		 */
 		ast_channel_lock(peer);
 		ast_connected_line_copy_from_caller(&connected, &peer->caller);
 		ast_channel_unlock(peer);
 		connected.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
-		if (ast_channel_connected_line_macro(peer, chan, &connected, 0, 0)) {
+		if (ast_channel_connected_line_macro(peer, chan, &connected, 1, 0)) {
 			ast_channel_update_connected_line(chan, &connected, NULL);
 		}
 
@@ -4968,7 +4974,6 @@
 		}
 		ast_channel_unlock(peer);
 
-/* BUGBUG this may be what we need to fix here to use when the parked call is retrieved. */
 		if ((parkinglot->cfg.parkedcalltransfers == AST_FEATURE_FLAG_BYCALLEE) || (parkinglot->cfg.parkedcalltransfers == AST_FEATURE_FLAG_BYBOTH)) {
 			ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
 		}




More information about the svn-commits mailing list