summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-08-13 16:24:37 +0000
committerJonathan Rose <jrose@digium.com>2014-08-13 16:24:37 +0000
commitd4695774e7ef3b4699b8283f175d161cd19e3d25 (patch)
tree4f59a5f5dc0094ffbe928dd21b6095defa056832 /include/asterisk/channel.h
parent6a6702bb0fff957c0264e872fe0760efe21a1e20 (diff)
Bridges: Fix feature interruption/unintended kick caused by external actions
If a manager or CLI user attached a mixmonitor to a call running a dynamic bridge feature while in a bridge, the feature would be interrupted and the channel would be forcibly kicked out of the bridge (usually ending the call during a simple 1 to 1 call). This would also occur during any similar action that could set the unbridge soft hangup flag, so the fix for this was to remove unbridge from the soft hangup flags and make it a separate thing all together. ASTERISK-24027 #close Reported by: mjordan Review: https://reviewboard.asterisk.org/r/3900/ ........ Merged revisions 420934 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 420940 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h39
1 files changed, 34 insertions, 5 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 08f4effe6..cee07f2cb 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -1049,11 +1049,6 @@ enum {
*/
AST_SOFTHANGUP_EXPLICIT = (1 << 5),
/*!
- * Used to request that the bridge core re-evaluate the current
- * bridging technology in use by the bridge this channel is in.
- */
- AST_SOFTHANGUP_UNBRIDGE = (1 << 6),
- /*!
* Used to indicate that the channel is currently executing hangup
* logic in the dialplan. The channel has been hungup when this is
* set.
@@ -1574,6 +1569,40 @@ int ast_check_hangup(struct ast_channel *chan);
int ast_check_hangup_locked(struct ast_channel *chan);
+/*! \brief This function will check if the bridge needs to be re-evaluated due to
+ * external changes.
+ *
+ * \param chan Channel on which to check the unbridge_eval flag
+ *
+ * \return Returns 0 if the flag is down or 1 if the flag is up.
+ */
+int ast_channel_unbridged(struct ast_channel *chan);
+
+/*! \brief ast_channel_unbridged variant. Use this if the channel
+ * is already locked prior to calling.
+ *
+ * \param chan Channel on which to check the unbridge flag
+ *
+ * \return Returns 0 if the flag is down or 1 if the flag is up.
+ */
+int ast_channel_unbridged_nolock(struct ast_channel *chan);
+
+/*! \brief Sets the unbridged flag and queues a NULL frame on the channel to trigger
+ * a check by bridge_channel_wait
+ *
+ * \param chan Which channel is having its unbridged value set
+ * \param value What the unbridge value is being set to
+ */
+void ast_channel_set_unbridged(struct ast_channel *chan, int value);
+
+/*! \brief Variant of ast_channel_set_unbridged. Use this if the channel
+ * is already locked prior to calling.
+ *
+ * \param chan Which channel is having its unbridged value set
+ * \param value What the unbridge value is being set to
+ */
+void ast_channel_set_unbridged_nolock(struct ast_channel *chan, int value);
+
/*!
* \brief Lock the given channel, then request softhangup on the channel with the given causecode
* \param chan channel on which to hang up