summaryrefslogtreecommitdiff
path: root/include/asterisk/features.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-08-23 02:22:33 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-08-23 02:22:33 +0000
commit9e9f3ace21bac01819b13c987dbfe4683ee7f037 (patch)
tree0c73b873409f35912621d09217c1457933edbb44 /include/asterisk/features.h
parenteb805b409fceff0161ba68facae8f80273071341 (diff)
add ability to map feature sequences to applications (issue #3764)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 */