summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorAlec L Davis <sivad.a@paradise.net.nz>2011-05-27 08:37:59 +0000
committerAlec L Davis <sivad.a@paradise.net.nz>2011-05-27 08:37:59 +0000
commit7cc83a901869edfa0ae716d15061bce427a0b808 (patch)
treeb803fdf89a22ed0c66f064cc68c3264fffdb1548 /main
parent9a7f807278554e6903870135497ad63a1fb15641 (diff)
Merged revisions 321211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321211 | alecdavis | 2011-05-27 20:31:15 +1200 (Fri, 27 May 2011) | 16 lines 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.8.diff.txt alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/1232/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/features.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/main/features.c b/main/features.c
index 452c88318..f59054683 100644
--- a/main/features.c
+++ b/main/features.c
@@ -5782,20 +5782,14 @@ int ast_pickup_call(struct ast_channel *chan)
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);
}