aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-22 18:46:26 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-22 18:46:26 +0000
commit32709b9aed7f32780208227d2947f132f9774daf (patch)
tree493ca6dc24159c6f8d1b6651cbba0e999bb09b3e /include
parent48b428d5f8b1f11810ff9ef10dfabb5a07a9f927 (diff)
The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
To recreate the problem: 1) Party A calls Party B 2) Invoke CLI "channel redirect" command to redirect channel call leg associated with A. 3) All associated channels are hung up. Note that if the CLI command were done on the channel call leg associated with B it works. This regression was a result of the fix for issue #16946 (https://reviewboard.asterisk.org/r/740/). The regression affects all features that use an async goto to execute the dialplan because of an external event: Channel redirect, AMI redirect, SIP REFER, and FAX detection. The struct ast_channel._softhangup code is a mess. The variable is used for several purposes that do not necessarily result in the call being hung up. I have added doxygen comments to describe how the various _softhangup bits are used. I have corrected all the places where the variable was tested in a non-bit oriented manner. The primary fix is the new AST_CONTROL_END_OF_Q frame. It acts as a weak hangup request so the soft hangup requests that do not normally result in a hangup do not hangup. JIRA SWP-2470 JIRA SWP-2489 (closes issue #18171) Reported by: SantaFox (closes issue #18185) Reported by: kwemheuer (closes issue #18211) Reported by: zahir_koradia (closes issue #18230) Reported by: vmarrone (closes issue #18299) Reported by: mbrevda (closes issue #18322) Reported by: nerbos Review: https://reviewboard.asterisk.org/r/1013/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@295790 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h32
-rw-r--r--include/asterisk/frame.h1
2 files changed, 31 insertions, 2 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index fb0046782..848682576 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -608,14 +608,42 @@ enum {
};
enum {
- /*! Soft hangup by device */
+ /*!
+ * Soft hangup requested by device or other internal reason.
+ * Actual hangup needed.
+ */
AST_SOFTHANGUP_DEV = (1 << 0),
- /*! Soft hangup for async goto */
+ /*!
+ * Used to break the normal frame flow so an async goto can be
+ * done instead of actually hanging up.
+ */
AST_SOFTHANGUP_ASYNCGOTO = (1 << 1),
+ /*!
+ * Soft hangup requested by system shutdown. Actual hangup
+ * needed.
+ */
AST_SOFTHANGUP_SHUTDOWN = (1 << 2),
+ /*!
+ * Used to break the normal frame flow after a timeout so an
+ * implicit async goto can be done to the 'T' exten if it exists
+ * instead of actually hanging up. If the exten does not exist
+ * then actually hangup.
+ */
AST_SOFTHANGUP_TIMEOUT = (1 << 3),
+ /*!
+ * Soft hangup requested by application/channel-driver being
+ * unloaded. Actual hangup needed.
+ */
AST_SOFTHANGUP_APPUNLOAD = (1 << 4),
+ /*!
+ * Soft hangup requested by non-associated party. Actual hangup
+ * needed.
+ */
AST_SOFTHANGUP_EXPLICIT = (1 << 5),
+ /*!
+ * Used to break a bridge so the channel can be spied upon
+ * instead of actually hanging up.
+ */
AST_SOFTHANGUP_UNBRIDGE = (1 << 6),
};
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index 6fc933a74..645e4071d 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -292,6 +292,7 @@ enum ast_control_frame_type {
AST_CONTROL_VIDUPDATE = 18, /*!< Indicate video frame update */
AST_CONTROL_SRCUPDATE = 20, /*!< Indicate source of media has changed */
AST_CONTROL_SRCCHANGE = 21, /*!< Media has changed and requires a new RTP SSRC */
+ AST_CONTROL_END_OF_Q = 22, /*!< Indicate that this position was the end of the channel queue for a softhangup. */
};
#define AST_SMOOTHER_FLAG_G729 (1 << 0)