diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-13 07:11:16 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-13 07:11:16 -0600 |
commit | f9f74f4b7568d9b40d35740683041891d1d33b00 (patch) | |
tree | 2a248d6cd4ceaa9494d3d281daa1768c9bd8b23a /include/asterisk | |
parent | 7e2bbe30fb637d336df7c846a8c9b4dbb9cae6a3 (diff) | |
parent | 0910773077f065a45e975c1a5914be084d9a4bdc (diff) |
Merge "manager: Restore Originate failure behavior from Asterisk 11"
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/pbx.h | 29 |
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 |