aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/features.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-23 02:22:33 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-23 02:22:33 +0000
commit89bf07cab32a022bd8d5f1caf426974d4d09928d (patch)
tree0c73b873409f35912621d09217c1457933edbb44 /include/asterisk/features.h
parent3f7567fe1548a9eae22c3d19233139ff219209c9 (diff)
add ability to map feature sequences to applications (issue #3764)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/features.h')
-rwxr-xr-xinclude/asterisk/features.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asterisk/features.h b/include/asterisk/features.h
index 5865b42ec..fb6bf382d 100755
--- a/include/asterisk/features.h
+++ b/include/asterisk/features.h
@@ -17,6 +17,28 @@
#ifndef _AST_FEATURES_H
#define _AST_FEATURES_H
+#define FEATURE_MAX_LEN 11
+#define FEATURE_APP_LEN 64
+#define FEATURE_APP_ARGS_LEN 256
+#define FEATURE_SNAME_LEN 32
+#define FEATURE_EXTEN_LEN 32
+
+/* main call feature structure */
+struct ast_call_feature {
+ int feature_mask;
+ char *fname;
+ char sname[FEATURE_SNAME_LEN];
+ char exten[FEATURE_MAX_LEN];
+ char default_exten[FEATURE_MAX_LEN];
+ int (*operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense);
+ unsigned int flags;
+ char app[FEATURE_APP_LEN];
+ char app_args[FEATURE_APP_ARGS_LEN];
+ AST_LIST_ENTRY(ast_call_feature) feature_entry;
+};
+
+
+
/*! Park a call and read back parked location */
/*! \param chan the channel to actually be parked
\param host the channel which will have the parked location read to
@@ -50,5 +72,15 @@ extern int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,st
extern int ast_pickup_call(struct ast_channel *chan);
+/*! register new feature into feature_set
+ \param feature an ast_call_feature object which contains a keysequence
+ and a callback function which is called when this keysequence is pressed
+ during a call. */
+extern void ast_register_feature(struct ast_call_feature *feature);
+
+/*! unregister feature from feature_set
+ \param feature the ast_call_feature object which was registered before*/
+extern void ast_unregister_feature(struct ast_call_feature *feature);
+
#endif /* _AST_FEATURES_H */