aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-18 19:45:11 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-18 19:45:11 +0000
commitf854b31d64461a86cb43b8ee9c6709ab04f5b3ff (patch)
treec25b135edaaef4613a2691918105a704c4032713 /include
parent7d2987e2ec9d520e89a8395c39f56407e28b76cf (diff)
Merged revisions 165723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r165723 | russell | 2008-12-18 13:33:42 -0600 (Thu, 18 Dec 2008) | 14 lines Remove the need for AST_PBX_KEEPALIVE with the GoSub option from Dial. This is part of an effort to completely remove AST_PBX_KEEPALIVE and other similar return codes from the source. While this usage was perfectly safe, there are others that are problematic. Since we know ahead of time that we do not want to PBX to destroy the channel, the PBX API has been changed so that information can be provided as an argument, instead, thus removing the need for the KEEPALIVE return value. Further changes to get rid of KEEPALIVE and related code is being done by murf. There is a patch up for that on review 29. Review: http://reviewboard.digium.com/r/98/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@165728 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/pbx.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 68bf0ccee..6e072bd6e 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -262,6 +262,37 @@ enum ast_pbx_result ast_pbx_start(struct ast_channel *c);
*/
enum ast_pbx_result ast_pbx_run(struct ast_channel *c);
+/*!
+ * \brief Options for ast_pbx_run()
+ */
+struct ast_pbx_args {
+ union {
+ /*! Pad this out so that we have plenty of room to add options
+ * but still maintain ABI compatibility over time. */
+ uint64_t __padding;
+ struct {
+ /*! Do not hangup the channel when the PBX is complete. */
+ unsigned int no_hangup_chan:1;
+ };
+ };
+};
+
+/*!
+ * \brief Execute the PBX in the current thread
+ *
+ * \param c channel to run the pbx on
+ * \param args options for the pbx
+ *
+ * This executes the PBX on a given channel. It allocates a new
+ * PBX structure for the channel, and provides all PBX functionality.
+ * See ast_pbx_start for an asynchronous function to run the PBX in a
+ * new thread as opposed to the current one.
+ *
+ * \retval Zero on success
+ * \retval non-zero on failure
+ */
+enum ast_pbx_result ast_pbx_run_args(struct ast_channel *c, struct ast_pbx_args *args);
+
/*!
* \brief Add and extension to an extension context.
*