mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 22:18:07 +00:00
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:
@@ -35,6 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/stasis.h"
|
||||
#include "asterisk/astobj2.h"
|
||||
#include "asterisk/stasis_channels.h"
|
||||
#include "asterisk/pbx.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<managerEvent language="en_US" name="VarSet">
|
||||
@@ -159,6 +160,13 @@ struct ast_channel_snapshot *ast_channel_snapshot_create(struct ast_channel *cha
|
||||
ast_string_field_set(snapshot, caller_number,
|
||||
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""));
|
||||
|
||||
ast_string_field_set(snapshot, caller_ani,
|
||||
S_COR(ast_channel_caller(chan)->ani.number.valid, ast_channel_caller(chan)->ani.number.str, ""));
|
||||
ast_string_field_set(snapshot, caller_rdnis,
|
||||
S_COR(ast_channel_redirecting(chan)->from.number.valid, ast_channel_redirecting(chan)->from.number.str, ""));
|
||||
ast_string_field_set(snapshot, caller_dnid,
|
||||
S_OR(ast_channel_dialed(chan)->number.str, ""));
|
||||
|
||||
ast_string_field_set(snapshot, connected_name,
|
||||
S_COR(ast_channel_connected(chan)->id.name.valid, ast_channel_connected(chan)->id.name.str, ""));
|
||||
ast_string_field_set(snapshot, connected_number,
|
||||
|
||||
Reference in New Issue
Block a user