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
This commit is contained in:
Kinsey Moore
2013-06-13 13:15:56 +00:00
parent 65c492e851
commit 4f84e48028
11 changed files with 850 additions and 188 deletions

View File

@@ -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 */