summaryrefslogtreecommitdiff
path: root/include/asterisk/audiohook.h
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-07-18 16:28:10 +0000
committerJonathan Rose <jrose@digium.com>2014-07-18 16:28:10 +0000
commitaf4cd651431b5a2a0dadebf4331be4fe61389e1b (patch)
tree989983f58c5a8ebca0b7588c9592a87f26db23db /include/asterisk/audiohook.h
parent5c988cc4e6c5693f03080f88e3057cb7a5358597 (diff)
Channels: Masquerades to automatically move frame/audio hooks
Whenever possible, audiohooks and framehooks will now be copied over to the channel that the masquerading channel gets cloned into. This should occur for all audiohooks and most framehooks. As a result, in Asterisk 12.5 and up, the AUDIOHOOK_INHERIT function is now deprecated and its behavior is essentially the new default for all audiohooks, plus some additional audiohooks/framehooks. Review: https://reviewboard.asterisk.org/r/3721/ ........ Merged revisions 418914 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/audiohook.h')
-rw-r--r--include/asterisk/audiohook.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 1a4e4696a..6b0716092 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -197,6 +197,17 @@ void ast_audiohook_detach_list(struct ast_audiohook_list *audiohook_list);
*/
void ast_audiohook_move_by_source(struct ast_channel *old_chan, struct ast_channel *new_chan, const char *source);
+/*! \brief Move all audiohooks from one channel to another
+ *
+ * \note It is required that both old_chan and new_chan are locked prior to calling
+ * this function. Besides needing to protect the data within the channels, not locking
+ * these channels can lead to a potential deadlock.
+ *
+ * \param old_chan The source of the audiohooks being moved
+ * \param new_chan The destination channel for the audiohooks to be moved to
+ */
+void ast_audiohook_move_all(struct ast_channel *old_chan, struct ast_channel *new_chan);
+
/*!
* \brief Detach specified source audiohook from channel
*