summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-02-09 11:01:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-02-10 18:01:54 -0500
commit8936568515d26eba6087a0064fe4d5d6e7f02ddd (patch)
tree9a56c64b9f8040c9384a45ffdb2a429fe21e2800 /include/asterisk
parentc7fcc4468ffd54066129a982ff5b0a3cdfa7c5e0 (diff)
manager: Restore Originate failure behavior from Asterisk 11
In Asterisk 11, if the 'Originate' AMI command failed to connect the provided Channel while in extension mode, a 'failed' extension would be looked up and run. This was, I believe, unintentionally removed in 51b6c49. This patch restores that behavior. This also adds an enum for the various 'synchronous' modes in an attempt to make them meaningful. ASTERISK-26115 #close Reported by: Nasir Iqbal Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/pbx.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 1fc8df8c9..770a1a984 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -1130,6 +1130,12 @@ int ast_async_goto(struct ast_channel *chan, const char *context, const char *ex
*/
int ast_async_goto_by_name(const char *chan, const char *context, const char *exten, int priority);
+enum ast_pbx_outgoing_sync {
+ AST_OUTGOING_NO_WAIT = 0, /*!< Don't wait for originated call to answer */
+ AST_OUTGOING_WAIT = 1, /*!< Wait for originated call to answer */
+ AST_OUTGOING_WAIT_COMPLETE = 2, /*!< Wait for originated call to answer and hangup */
+};
+
/*!
* \brief Synchronously or asynchronously make an outbound call and send it to a
* particular extension
@@ -1143,11 +1149,15 @@ int ast_async_goto_by_name(const char *chan, const char *context, const char *ex
* \param priority The destination priority for the outbound channel
* \param reason Optional. If provided, the dialed status of the outgoing channel.
* Codes are AST_CONTROL_xxx values. Valid only if synchronous is non-zero.
- * \param synchronous If zero then don't wait for anything.
- * If one then block until the outbound channel answers or the call fails.
- * If greater than one then wait for the call to complete or if the call doesn't
- * answer and failed@context exists then run a channel named OutgoingSpoolFailed
- * at failed@context.
+ * \param synchronous defined by the ast_pbx_outgoing_sync enum.
+ * If \c AST_OUTGOING_NO_WAIT then don't wait for anything.
+ * If \c AST_OUTGOING_WAIT then block until the outbound channel answers or
+ * the call fails.
+ * If \c AST_OUTGOING_WAIT_COMPLETE then wait for the call to complete or
+ * fail.
+ * If \c AST_OUTGOING_WAIT or \c AST_OUTGOING_WAIT_COMPLETE is specified,
+ * the call doesn't answer, and \c failed@context exists then run a channel
+ * named \c OutgoingSpoolFailed at \c failed@context.
* \param cid_num The caller ID number to set on the outbound channel
* \param cid_name The caller ID name to set on the outbound channel
* \param vars Variables to set on the outbound channel
@@ -1181,9 +1191,12 @@ int ast_pbx_outgoing_exten(const char *type, struct ast_format_cap *cap, const c
* \param appdata Data to pass to the application
* \param reason Optional. If provided, the dialed status of the outgoing channel.
* Codes are AST_CONTROL_xxx values. Valid only if synchronous is non-zero.
- * \param synchronous If zero then don't wait for anything.
- * If one then block until the outbound channel answers or the call fails.
- * If greater than one then wait for the call to complete.
+ * \param synchronous defined by the ast_pbx_outgoing_sync enum.
+ * If \c AST_OUTGOING_NO_WAIT then don't wait for anything.
+ * If \c AST_OUTGOING_WAIT then block until the outbound channel answers or
+ * the call fails.
+ * If \c AST_OUTGOING_WAIT_COMPLETE then wait for the call to complete or
+ * fail.
* \param cid_num The caller ID number to set on the outbound channel
* \param cid_name The caller ID name to set on the outbound channel
* \param vars Variables to set on the outbound channel