aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/pbx.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-29 23:53:29 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-29 23:53:29 +0000
commit9fc16d81a1f2ed5a0b4f0e9271036e6c37f4a4e9 (patch)
treebe2e95a515d90713c35a8f5fa517fd6d4e4828e9 /include/asterisk/pbx.h
parent3a4e85fe5c2b854bac4c9dcd65834ab82cdca83a (diff)
massive upgrade to SUBSCRIBE, device state and messaging support (issue #3644)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/pbx.h')
-rwxr-xr-xinclude/asterisk/pbx.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index d54d3ef8e..f36d971bf 100755
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -42,11 +42,26 @@ enum ast_extension_states {
/*! No device INUSE or BUSY */
AST_EXTENSION_NOT_INUSE = 0,
/*! One or more devices INUSE */
- AST_EXTENSION_INUSE = 1,
+ AST_EXTENSION_INUSE = 1 << 0,
/*! All devices BUSY */
- AST_EXTENSION_BUSY = 2,
+ AST_EXTENSION_BUSY = 1 << 1,
/*! All devices UNAVAILABLE/UNREGISTERED */
- AST_EXTENSION_UNAVAILABLE = 3,
+ AST_EXTENSION_UNAVAILABLE = 1 << 2,
+ /*! All devices RINGING */
+ AST_EXTENSION_RINGING = 1 << 3,
+};
+
+
+static const struct cfextension_states {
+ int extension_state;
+ const char * const text;
+} extension_states[] = {
+ { AST_EXTENSION_NOT_INUSE, "Idle" },
+ { AST_EXTENSION_INUSE, "InUse" },
+ { AST_EXTENSION_BUSY, "Busy" },
+ { AST_EXTENSION_UNAVAILABLE, "Unavailable" },
+ { AST_EXTENSION_RINGING, "Ringing" },
+ { AST_EXTENSION_INUSE | AST_EXTENSION_RINGING, "InUse&Ringing" }
};
struct ast_context;
@@ -257,6 +272,13 @@ int ast_unregister_application(const char *app);
*/
int ast_extension_state(struct ast_channel *c, char *context, char *exten);
+/*! Return string of the state of an extension */
+/*!
+ * \param extension_state is the numerical state delivered by ast_extension_state
+ * Returns the state of an extension as string
+ */
+const char *ast_extension_state2str(int extension_state);
+
/*! Registers a state change callback */
/*!
* \param context which context to look in