summaryrefslogtreecommitdiff
path: root/include/asterisk/audiohook.h
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-12-19 22:26:16 +0000
committerMark Michelson <mmichelson@digium.com>2008-12-19 22:26:16 +0000
commit9733b30ff04d33b88d192ed6ac18fa95a20dde89 (patch)
tree7755ccd419fe98626d8ed1a778a114282864ff63 /include/asterisk/audiohook.h
parent775033301a6a86518cd7713c693ebf71ce36b95e (diff)
Adding a new dialplan function AUDIOHOOK_INHERIT
This function is being added as a method to allow for an audiohook to move to a new channel during a channel masquerade. The most obvious use for such a facility is for MixMonitor when a transfer is performed. Prior to the addition of this functionality, if a channel running MixMonitor was transferred by another party, then the recording would stop once the transfer had completed. By using AUDIOHOOK_INHERIT, you can make MixMonitor continue recording the call even after the transfer has completed. It has also been determined that since this is seen by most as a bug fix and is not an invasive change, this functionality will also be backported to 1.4 and merged into the 1.6.0 branches, even though they are feature-frozen. (closes issue #13538) Reported by: mbit Patches: 13538.patch uploaded by putnopvut (license 60) Tested by: putnopvut Review: http://reviewboard.digium.com/r/102/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/audiohook.h')
-rw-r--r--include/asterisk/audiohook.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index cda2c2977..acda0a652 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -150,6 +150,21 @@ int ast_audiohook_detach(struct ast_audiohook *audiohook);
*/
int ast_audiohook_detach_list(struct ast_audiohook_list *audiohook_list);
+/*! \brief Move an audiohook from one channel to a new one
+ *
+ * \todo Currently only the first audiohook of a specific source found will be moved.
+ * We should add the capability to move multiple audiohooks from a single source as well.
+ *
+ * \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 audiohook to move
+ * \param new_chan The destination to which we want the audiohook to move
+ * \param source The source of the audiohook we want to move
+ */
+void ast_audiohook_move_by_source(struct ast_channel *old_chan, struct ast_channel *new_chan, const char *source);
+
/*!
* \brief Detach specified source audiohook from channel
*