aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-19 17:10:09 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-19 17:10:09 +0000
commit5704af775c913baa29c294f4ec93dad551bb5dff (patch)
treedfb7d69128ddfead41605d17b19b4c3b940253f7 /include
parent47c9aae208a4bc5ade15920b5e6eeaa84ffdbfe2 (diff)
Merged revisions 183172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines Merged revisions 183126 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines Allow disconnect feature before a call is bridged feature.conf has a disconnect option. By default this option is set to '*', but it could be anything. If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else. This is because features are unavailable until bridging takes place. The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different. This patch allows features to be detected from outside of the bridge, but not operated on. In this case, the disconnect feature can be detected before briding and handled outside of features.c. (closes issue #11583) Reported by: sobomax Patches: patch-apps__app_dial.c uploaded by sobomax (license 359) 11583.latest-patch uploaded by murf (license 17) detect_disconnect.diff uploaded by dvossel (license 671) Tested by: sobomax, dvossel Review: http://reviewboard.digium.com/r/195/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183199 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/features.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/asterisk/features.h b/include/asterisk/features.h
index d49e2575b..13d9ae1e1 100644
--- a/include/asterisk/features.h
+++ b/include/asterisk/features.h
@@ -31,6 +31,21 @@
#define FEATURE_EXTEN_LEN 32
#define FEATURE_MOH_LEN 80 /* same as MAX_MUSICCLASS from channel.h */
+#define AST_FEATURE_RETURN_HANGUP -1
+#define AST_FEATURE_RETURN_SUCCESSBREAK 0
+#define AST_FEATURE_RETURN_PBX_KEEPALIVE AST_PBX_KEEPALIVE
+#define AST_FEATURE_RETURN_NO_HANGUP_PEER AST_PBX_NO_HANGUP_PEER
+#define AST_FEATURE_RETURN_PASSDIGITS 21
+#define AST_FEATURE_RETURN_STOREDIGITS 22
+#define AST_FEATURE_RETURN_SUCCESS 23
+#define AST_FEATURE_RETURN_KEEPTRYING 24
+#define AST_FEATURE_RETURN_PARKFAILED 25
+
+#define FEATURE_SENSE_CHAN (1 << 0)
+#define FEATURE_SENSE_PEER (1 << 1)
+
+typedef int (*ast_feature_operation)(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, char *code, int sense, void *data);
+
/*! \brief main call feature structure */
struct ast_call_feature {
int feature_mask;
@@ -38,7 +53,7 @@ struct ast_call_feature {
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, void *data);
+ ast_feature_operation operation;
unsigned int flags;
char app[FEATURE_APP_LEN];
char app_args[FEATURE_APP_ARGS_LEN];
@@ -101,6 +116,10 @@ void ast_register_feature(struct ast_call_feature *feature);
\param feature the ast_call_feature object which was registered before*/
void ast_unregister_feature(struct ast_call_feature *feature);
+/*! \brief detect a feature before bridging
+ \para chan, ast_flags ptr, code, ast_call_feature ptr to be set if found */
+int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, char *code, struct ast_call_feature *feature);
+
/*! \brief look for a call feature entry by its sname
\param name a string ptr, should match "automon", "blindxfer", "atxfer", etc. */
struct ast_call_feature *ast_find_call_feature(const char *name);