summaryrefslogtreecommitdiff
path: root/include/asterisk/pbx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/pbx.h')
-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 386f3c38b..008cfd3cb 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -1144,6 +1144,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
@@ -1157,11 +1163,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
@@ -1201,9 +1211,12 @@ int ast_pbx_outgoing_exten_predial(const char *type, struct ast_format_cap *cap,
* \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