summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-11-16 16:55:39 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-11-16 16:55:39 -0600
commitaa1482aed4e837b7d8980899ebe2a3ee07b8149e (patch)
tree596dd6b30e9f0bbfe1152c62ca8cfabd84942be9 /include/asterisk/channel.h
parentcaa207bc4f397466f6f811ecf2f11e99fd5eab1a (diff)
parentac6051c302d8e5b858e86dd4ed8bb452328858d0 (diff)
Merge "channel: Fix issues in hangup scenarios caused by frame deferral" into 14
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 58d9a0480..9745bc220 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -972,6 +972,11 @@ enum {
* frames should be deferred.
*/
AST_FLAG_DEFER_FRAMES = (1 << 28),
+ /*!
+ * The channel is currently deferring hangup frames
+ * in addition to other frame types.
+ */
+ AST_FLAG_DEFER_HANGUP_FRAMES = (1 << 29),
};
/*! \brief ast_bridge_config flags */
@@ -4710,11 +4715,17 @@ struct ast_readq_list *ast_channel_deferred_readq(struct ast_channel *chan);
* drop important frames. This function can be called so that important frames
* will be deferred, rather than placed in the channel frame queue as normal.
*
+ * Hangups are an interesting frame type. Hangups will always be detectable by
+ * a reader when a channel is deferring frames. If the defer_hangups parameter
+ * is non-zero, then the hangup frame will also be duplicated and deferred, so
+ * that the next reader of the channel will get the hangup frame, too.
+ *
* \pre chan MUST be locked before calling
*
* \param chan The channel on which frames should be deferred
+ * \param defer_hangups Defer hangups in addition to other deferrable frames
*/
-void ast_channel_start_defer_frames(struct ast_channel *chan);
+void ast_channel_start_defer_frames(struct ast_channel *chan, int defer_hangups);
/*!
* \brief Stop deferring deferrable frames on this channel