32#if defined(__cplusplus) || defined(c_plusplus)
143 #define AST_CEL_EVENT_RECORD_VERSION 3
283 struct ast_json *extra,
const char *peer_str);
305 const char *userdefevname,
struct ast_json *extra,
const char *peer_str);
336#if defined(__cplusplus) || defined(c_plusplus)
struct ast_event * ast_cel_create_event_with_time(struct ast_channel_snapshot *snapshot, enum ast_cel_event_type event_type, const struct timeval *event_time, const char *userdefevname, struct ast_json *extra, const char *peer_str)
Allocate and populate a CEL event structure.
void ast_cel_publish_user_event(struct ast_channel *chan, const char *event, const char *extra)
Publish a CEL user event.
void ast_cel_set_config(struct ast_cel_general_config *config)
Set the current CEL configuration.
struct ast_event * ast_cel_create_event(struct ast_channel_snapshot *snapshot, enum ast_cel_event_type event_type, const char *userdefevname, struct ast_json *extra, const char *peer_str)
Allocate and populate a CEL event structure.
int ast_cel_backend_unregister(const char *name)
Unregister a CEL backend.
enum ast_cel_event_type ast_cel_str_to_event_type(const char *name)
Get the event type from a string.
void ast_cel_publish_event(struct ast_channel *chan, enum ast_cel_event_type event_type, struct ast_json *blob)
Publish a CEL event.
ast_cel_event_type
CEL event types.
@ AST_CEL_CHANNEL_END
channel end
@ AST_CEL_APP_END
an app ends
@ AST_CEL_ANSWER
A ringing phone is answered.
@ AST_CEL_PARK_START
a channel is parked
@ AST_CEL_LINKEDID_END
the last channel with the given linkedid is retired
@ AST_CEL_BRIDGE_EXIT
channel exits a bridge
@ AST_CEL_FORWARD
this call was forwarded somewhere else
@ AST_CEL_HANGUP
hangup terminates connection
@ AST_CEL_USER_DEFINED
a user-defined event, the event name field should be set
@ AST_CEL_PICKUP
a directed pickup was performed on this channel
@ AST_CEL_APP_START
an app starts
@ AST_CEL_LOCAL_OPTIMIZE_BEGIN
A local channel optimization has begun.
@ AST_CEL_PARK_END
channel out of the park
@ AST_CEL_CHANNEL_START
channel birth
@ AST_CEL_ATTENDEDTRANSFER
a transfer occurs
@ AST_CEL_BRIDGE_ENTER
channel enters a bridge
@ AST_CEL_BLINDTRANSFER
a transfer occurs
@ AST_CEL_LOCAL_OPTIMIZE
A local channel optimization occurred, this marks the end.
void * ast_cel_general_config_alloc(void)
Allocate a CEL configuration object.
unsigned int ast_cel_check_enabled(void)
Check to see if CEL is enabled.
void(* ast_cel_backend_cb)(struct ast_event *event)
CEL backend callback.
struct stasis_topic * ast_cel_topic(void)
Get the CEL topic.
struct ast_channel * ast_cel_fabricate_channel_from_event(const struct ast_event *event)
Create a fake channel from data in a CEL event.
int ast_cel_fill_record(const struct ast_event *event, struct ast_cel_event_record *r)
Fill in an ast_cel_event_record from a CEL event.
struct ast_cel_general_config * ast_cel_get_config(void)
Obtain the current CEL configuration.
int ast_cel_backend_register(const char *name, ast_cel_backend_cb backend_callback)
Register a CEL backend.
const char * ast_cel_get_type_name(enum ast_cel_event_type type)
Get the name of a CEL event type.
static const char config[]
#define AST_STRING_FIELD(name)
Declare a string field.
Helper struct for getting the fields out of a CEL event.
const char * caller_id_dnid
const char * application_data
const char * account_code
const char * caller_id_rdnis
const char * caller_id_num
const char * channel_name
const char * peer_account
enum ast_cel_event_type event_type
const char * user_defined_name
const char * application_name
struct timeval event_time
uint32_t version
struct ABI version
const char * caller_id_ani
const char * caller_id_name
A structure to hold CEL global configuration options.
AST_DECLARE_STRING_FIELDS(AST_STRING_FIELD(date_format);)
struct ao2_container * apps
Structure representing a snapshot of channel state.
Main Channel structure associated with a channel.
Abstract JSON element (object, array, string, int, ...).