diff --git a/main/features.c b/main/features.c index 452c88318c..f59054683c 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); }