summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-06-13 13:15:56 +0000
committerKinsey Moore <kmoore@digium.com>2013-06-13 13:15:56 +0000
commit4f84e48028b8f21babd26b7f0b8c1d375f1c356c (patch)
tree584e569f685ea7ed662d696793b7442ab8496e47 /include/asterisk
parent65c492e851639897d8db79741bdcebc3557ad29d (diff)
Refactor CEL channel events on top of Stasis-Core
This uses the channel state change events from Stasis-Core to determine when channel-related CEL events should be raised. Those refactored in this patch are: * AST_CEL_CHANNEL_START * AST_CEL_ANSWER * AST_CEL_APP_START * AST_CEL_APP_END * AST_CEL_HANGUP * AST_CEL_CHANNEL_END Retirement of Linked IDs is also refactored. CEL configuration has been refactored to use the config framework. Note: Some HANGUP events are not generated correctly because the bridge layer does not propagate hangupcause/hangupsource information yet. Review: https://reviewboard.asterisk.org/r/2544/ (closes issue ASTERISK-21563) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/config_options.h9
-rw-r--r--include/asterisk/stasis_bridging.h2
-rw-r--r--include/asterisk/stasis_channels.h3
-rw-r--r--include/asterisk/strings.h42
4 files changed, 52 insertions, 4 deletions
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h
index 739d83130..b73b276e8 100644
--- a/include/asterisk/config_options.h
+++ b/include/asterisk/config_options.h
@@ -146,10 +146,11 @@ typedef void *(*aco_snapshot_alloc)(void);
/*! \brief The representation of a single configuration file to be processed */
struct aco_file {
- const char *filename; /*!< \brief The filename to be processed */
- const char *alias; /*!< \brief An alias filename to be tried if 'filename' cannot be found */
- const char **preload; /*!< \brief A null-terminated oredered array of categories to be loaded first */
- struct aco_type *types[]; /*!< The list of types for this config. Required. Use a sentinel! */
+ const char *filename; /*!< The filename to be processed */
+ const char *alias; /*!< An alias filename to be tried if 'filename' cannot be found */
+ const char **preload; /*!< A null-terminated ordered array of categories to be loaded first */
+ const char *skip_category; /*!< A regular expression of categories to skip in the file. Use when a file is processed by multiple modules */
+ struct aco_type *types[]; /*!< The list of types for this config. Required. Use a sentinel! */
};
struct aco_info {
diff --git a/include/asterisk/stasis_bridging.h b/include/asterisk/stasis_bridging.h
index 42cb73ba0..a9366e73d 100644
--- a/include/asterisk/stasis_bridging.h
+++ b/include/asterisk/stasis_bridging.h
@@ -45,6 +45,8 @@ struct ast_bridge_snapshot {
struct ao2_container *channels;
/*! Bridge flags to tweak behavior */
struct ast_flags feature_flags;
+ /*! Bridge capabilities */
+ uint32_t capabilities;
/*! Number of channels participating in the bridge */
unsigned int num_channels;
/*! Number of active channels in the bridge. */
diff --git a/include/asterisk/stasis_channels.h b/include/asterisk/stasis_channels.h
index d16b92dc2..339c77274 100644
--- a/include/asterisk/stasis_channels.h
+++ b/include/asterisk/stasis_channels.h
@@ -52,6 +52,9 @@ struct ast_channel_snapshot {
AST_STRING_FIELD(exten); /*!< Dialplan: Current extension number */
AST_STRING_FIELD(caller_name); /*!< Caller ID Name */
AST_STRING_FIELD(caller_number); /*!< Caller ID Number */
+ AST_STRING_FIELD(caller_ani); /*!< Caller ID ANI Number */
+ AST_STRING_FIELD(caller_rdnis); /*!< Caller ID RDNIS Number */
+ AST_STRING_FIELD(caller_dnid); /*!< Caller ID DNID Number */
AST_STRING_FIELD(connected_name); /*!< Connected Line Name */
AST_STRING_FIELD(connected_number); /*!< Connected Line Number */
AST_STRING_FIELD(language); /*!< The default spoken language for the channel */
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 967eb82a0..30d2503d8 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -1067,4 +1067,46 @@ static force_inline int attribute_pure ast_str_case_hash(const char *str)
return abs(hash);
}
+/*!
+ * \brief Convert a string to all lower-case
+ *
+ * \param str The string to be converted to lower case
+ *
+ * \retval str for convenience
+ */
+static force_inline char *attribute_pure ast_str_to_lower(char *str)
+{
+ char *str_orig = str;
+ if (!str) {
+ return str;
+ }
+
+ for (; *str; ++str) {
+ *str = tolower(*str);
+ }
+
+ return str_orig;
+}
+
+/*!
+ * \brief Convert a string to all upper-case
+ *
+ * \param str The string to be converted to upper case
+ *
+ * \retval str for convenience
+ */
+static force_inline char *attribute_pure ast_str_to_upper(char *str)
+{
+ char *str_orig = str;
+ if (!str) {
+ return str;
+ }
+
+ for (; *str; ++str) {
+ *str = toupper(*str);
+ }
+
+ return str_orig;
+}
+
#endif /* _ASTERISK_STRINGS_H */