[svn-commits] alecdavis: branch 1.8 r321211 - /branches/1.8/main/features.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 27 03:31:33 CDT 2011


Author: alecdavis
Date: Fri May 27 03:31:15 2011
New Revision: 321211

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321211
Log:
Fix *8 directed pickup locks system during pickupsound play out

move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
This stop the clash of 2 threads trying to write audio to same channel.
In addition fixes choppy audio beep in issue 19177.
 
 (issue #18654)
 (issue #19177)
 Reported by: Docent
 Patches: 
      review1232-1.88888888 alecdavis (license 585)
 Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1232/


Modified:
    branches/1.8/main/features.c

Modified: branches/1.8/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/features.c?view=diff&rev=321211&r1=321210&r2=321211
==============================================================================
--- branches/1.8/main/features.c (original)
+++ branches/1.8/main/features.c Fri May 27 03:31:15 2011
@@ -5726,20 +5726,14 @@
 		ast_log(LOG_NOTICE, "pickup %s attempt by %s\n", target->name, chan->name);
 
 		res = ast_do_pickup(chan, target);
+		ast_channel_unlock(target);
 		if (!res) {
 			if (!ast_strlen_zero(pickupsound)) {
-				/*!
-				 * \todo We are not the bridge thread when we inject this sound
-				 * so we need to hold the target channel lock while the sound is
-				 * played.  A better way needs to be found as this pauses the
-				 * system.
-				 */
-				ast_stream_and_wait(target, pickupsound, "");
+				pbx_builtin_setvar_helper(target, "BRIDGE_PLAY_SOUND", pickupsound);
 			}
 		} else {
 			ast_log(LOG_WARNING, "pickup %s failed by %s\n", target->name, chan->name);
 		}
-		ast_channel_unlock(target);
 		target = ast_channel_unref(target);
 	}
 




More information about the svn-commits mailing list