Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv11443/include/asterisk

Modified Files:
        channel.h features.h 
Log Message:
add ability to map feature sequences to applications (issue #3764)


Index: channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- channel.h   9 Aug 2005 01:59:59 -0000       1.96
+++ channel.h   23 Aug 2005 02:22:32 -0000      1.97
@@ -373,6 +373,8 @@
 #define AST_FEATURE_AUTOMON            (1 << 4)
 
 #define AST_FEATURE_FLAG_NEEDSDTMF     (1 << 0)
+#define AST_FEATURE_FLAG_CALLEE                (1 << 1)
+#define AST_FEATURE_FLAG_CALLER                (1 << 2)
 
 struct ast_bridge_config {
        struct ast_flags features_caller;

Index: features.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/features.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- features.h  15 Jan 2005 23:48:12 -0000      1.4
+++ features.h  23 Aug 2005 02:22:32 -0000      1.5
@@ -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_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 */

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to