| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Channel Event Logging API. More...
#include "asterisk.h"#include "asterisk/module.h"#include "asterisk/channel.h"#include "asterisk/pbx.h"#include "asterisk/cel.h"#include "asterisk/logger.h"#include "asterisk/linkedlists.h"#include "asterisk/utils.h"#include "asterisk/config.h"#include "asterisk/config_options.h"#include "asterisk/cli.h"#include "asterisk/astobj2.h"#include "asterisk/stasis_message_router.h"#include "asterisk/stasis_channels.h"#include "asterisk/stasis_bridges.h"#include "asterisk/bridge.h"#include "asterisk/parking.h"#include "asterisk/pickup.h"#include "asterisk/core_local.h"#include "asterisk/taskprocessor.h"
Go to the source code of this file.
| Data Structures | |
| struct | cel_backend | 
| struct | cel_config | 
| A container that holds all config-related information.  More... | |
| struct | cel_dialstatus | 
| struct | cel_linkedid | 
| Macros | |
| #define | BACKEND_BUCKETS 13 | 
| #define | CEL_MAX_EVENT_IDS 64 | 
| Maximum possible CEL event IDs. | |
| #define | NUM_APP_BUCKETS 97 | 
| Number of buckets for the appset container. | |
| #define | NUM_DIALSTATUS_BUCKETS 251 | 
| Number of buckets for the dialstatus container. | |
| Typedefs | |
| typedef void(* | cel_channel_snapshot_monitor) (struct ast_channel_snapshot *old_snapshot, struct ast_channel_snapshot *new_snapshot, const struct timeval *event_time) | 
| Typedef for callbacks that get called on channel snapshot updates. | |
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static | AO2_GLOBAL_OBJ_STATIC (cel_backends) | 
| static | AO2_GLOBAL_OBJ_STATIC (cel_configs) | 
| static | AO2_GLOBAL_OBJ_STATIC (cel_dialstatus_store) | 
| static | AO2_GLOBAL_OBJ_STATIC (cel_linkedids) | 
| static int | apps_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) | 
| int | ast_cel_backend_register (const char *name, ast_cel_backend_cb backend_callback) | 
| Register a CEL backend. | |
| int | ast_cel_backend_unregister (const char *name) | 
| Unregister a CEL backend. | |
| unsigned int | ast_cel_check_enabled (void) | 
| Hashing function for cel_backend. | |
| 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) | 
| Allocate and populate a CEL event structure. | |
| 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) | 
| Allocate and populate a CEL event structure. | |
| 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 *e, struct ast_cel_event_record *r) | 
| Fill in an ast_cel_event_record from a CEL event. | |
| void * | ast_cel_general_config_alloc (void) | 
| Allocate a CEL configuration object. | |
| struct ast_cel_general_config * | ast_cel_get_config (void) | 
| Obtain the current CEL configuration. | |
| const char * | ast_cel_get_type_name (enum ast_cel_event_type type) | 
| Get the name of a CEL event type. | |
| void | ast_cel_publish_event (struct ast_channel *chan, enum ast_cel_event_type event_type, struct ast_json *blob) | 
| Publish a CEL event. | |
| 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. | |
| enum ast_cel_event_type | ast_cel_str_to_event_type (const char *name) | 
| Get the event type from a string. | |
| struct stasis_topic * | ast_cel_topic (void) | 
| Get the CEL topic. | |
| static int | ast_cel_track_event (enum ast_cel_event_type et) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static void | cel_attended_transfer_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static int | cel_backend_send_cb (void *obj, void *arg, int flags) | 
| static void | cel_blind_transfer_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_bridge_enter_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_bridge_leave_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_channel_app_change (struct ast_channel_snapshot *old_snapshot, struct ast_channel_snapshot *new_snapshot, const struct timeval *event_time) | 
| static void | cel_channel_linkedid_change (struct ast_channel_snapshot *old_snapshot, struct ast_channel_snapshot *new_snapshot, const struct timeval *event_time) | 
| static void | cel_channel_state_change (struct ast_channel_snapshot *old_snapshot, struct ast_channel_snapshot *new_snapshot, const struct timeval *event_time) | 
| Handle channel state changes. | |
| static void * | cel_config_alloc (void) | 
| static void | cel_config_dtor (void *obj) | 
| Destructor for cel_config. | |
| static void | cel_dial_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static int | cel_filter_channel_snapshot (struct ast_channel_snapshot *snapshot) | 
| static void | cel_general_config_dtor (void *obj) | 
| Destructor for cel_config. | |
| static struct ast_str * | cel_generate_peer_str (struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *chan) | 
| static void | cel_generic_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| struct stasis_message_type * | cel_generic_type (void) | 
| static int | cel_linkedid_ref (const char *linkedid) | 
| static void | cel_local_optimization_begin_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_local_optimization_cb_helper (void *data, struct stasis_subscription *sub, struct stasis_message *message, enum ast_cel_event_type event_type) | 
| static void | cel_local_optimization_end_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_parking_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static void | cel_pickup_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static int | cel_pre_apply_config (void) | 
| static int | cel_report_event (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) | 
| static void | cel_snapshot_update_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) | 
| static int | cel_track_app (const char *const_app) | 
| static void | check_retire_linkedid (struct ast_channel_snapshot *snapshot, const struct timeval *event_time) | 
| CONFIG_INFO_CORE ("cel", cel_cfg_info, cel_configs, cel_config_alloc,.files=ACO_FILES(&cel_conf),.pre_apply_config=cel_pre_apply_config,) | |
| static int | create_routes (void) | 
| Create the Stasis message router and routes for CEL. | |
| static int | create_subscriptions (void) | 
| Create the Stasis subscriptions for CEL. | |
| static void | destroy_routes (void) | 
| static void | destroy_subscriptions (void) | 
| static int | events_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) | 
| static const char * | get_blob_variable (struct ast_multi_channel_blob *blob, const char *varname) | 
| static struct cel_dialstatus * | get_dialstatus (const char *uniqueid) | 
| static char * | handle_cli_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) | 
| static int | is_valid_dialstatus (struct ast_multi_channel_blob *blob) | 
| static int | load_module (void) | 
| static int | reload_module (void) | 
| static void | save_dialstatus (struct ast_multi_channel_blob *blob, struct ast_channel_snapshot *snapshot) | 
| STASIS_MESSAGE_TYPE_DEFN (cel_generic_type) | |
| static int | unload_module (void) | 
Channel Event Logging API.
Definition in file cel.c.
| #define BACKEND_BUCKETS 13 | 
| #define CEL_MAX_EVENT_IDS 64 | 
| #define NUM_APP_BUCKETS 97 | 
| #define NUM_DIALSTATUS_BUCKETS 251 | 
| typedef void(* cel_channel_snapshot_monitor) (struct ast_channel_snapshot *old_snapshot, struct ast_channel_snapshot *new_snapshot, const struct timeval *event_time) | 
| 
 | static | 
Container for CEL backend information
| 
 | static | 
| 
 | static | 
Container for dial end multichannel blobs for holding on to dial statuses
| 
 | static | 
Container of channel references to a linkedid for CEL purposes.
| 
 | static | 
Definition at line 495 of file cel.c.
References ast_cel_general_config::apps, ast_str_container_add(), ast_str_to_lower(), ast_strdupa, ast_strip(), ast_strlen_zero(), strsep(), and var.
Referenced by load_module().
| int ast_cel_backend_register | ( | const char * | name, | 
| ast_cel_backend_cb | backend_callback | ||
| ) | 
Register a CEL backend.
| name | Name of backend to register | 
| backend_callback | Callback to register | 
| zero | on success | 
| non-zero | on failure | 
Definition at line 1809 of file cel.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_cleanup, ao2_global_obj_ref, ao2_link, ao2_ref, ast_strlen_zero(), cel_backend::callback, cel_backend::name, name, NULL, and RAII_VAR.
Referenced by load_config(), load_config(), load_module(), load_module(), load_module(), load_module(), load_module(), my_load_module(), and test_cel_init_cb().
| int ast_cel_backend_unregister | ( | const char * | name | ) | 
Unregister a CEL backend.
| name | Name of backend to unregister | 
| zero | on success | 
| non-zero | on failure | 
Definition at line 1797 of file cel.c.
References ao2_find, ao2_global_obj_ref, ao2_ref, name, OBJ_NODATA, OBJ_SEARCH_KEY, and OBJ_UNLINK.
Referenced by cel_verify_and_cleanup_cb(), load_config(), load_config(), my_unload_module(), tds_unload_module(), unload_module(), unload_module(), unload_module(), unload_module(), unload_module(), and unload_module().
| unsigned int ast_cel_check_enabled | ( | void | ) | 
Hashing function for cel_backend.
Check to see if CEL is enabled.
Comparator function for cel_backend
Hashing function for dialstatus container
Comparator function for dialstatus container
Definition at line 366 of file cel.c.
References ao2_cleanup, ao2_global_obj_ref, ast_cel_general_config::enable, enabled, and cel_config::general.
Referenced by ast_cel_set_config(), handle_cli_status(), load_module(), and reload_module().
| 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.
| snapshot | An ast_channel_snapshot of the primary channel associated with this channel event. | 
| event_type | The type of call event being reported. | 
| userdefevname | Custom name for the call event. (optional) | 
| extra | An event-specific opaque JSON blob to be rendered and placed in the "CEL_EXTRA" information element of the call event. (optional) | 
| peer_str | A list of comma-separated peer channel names. (optional) | 
| The | created ast_event structure | 
| NULL | on failure | 
Definition at line 540 of file cel.c.
References ast_cel_create_event_with_time(), and ast_tvnow().
Referenced by append_expected_event_snapshot().
| 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.
| snapshot | An ast_channel_snapshot of the primary channel associated with this channel event. | 
| event_type | The type of call event being reported. | 
| event_time | The time at which the event occurred. | 
| userdefevname | Custom name for the call event. (optional) | 
| extra | An event-specific opaque JSON blob to be rendered and placed in the "CEL_EXTRA" information element of the call event. (optional) | 
| peer_str | A list of comma-separated peer channel names. (optional) | 
| The | created ast_event structure | 
| NULL | on failure | 
Definition at line 550 of file cel.c.
References ast_channel_snapshot_peer::account, ast_channel_snapshot_base::accountcode, ast_channel_snapshot::amaflags, ast_channel_snapshot_caller::ani, ast_channel_snapshot_dialplan::appl, AST_EVENT_CEL, AST_EVENT_IE_CEL_ACCTCODE, AST_EVENT_IE_CEL_AMAFLAGS, AST_EVENT_IE_CEL_APPDATA, AST_EVENT_IE_CEL_APPNAME, AST_EVENT_IE_CEL_CHANNAME, AST_EVENT_IE_CEL_CIDANI, AST_EVENT_IE_CEL_CIDDNID, AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_CEL_CONTEXT, AST_EVENT_IE_CEL_EVENT_TIME, AST_EVENT_IE_CEL_EVENT_TIME_USEC, AST_EVENT_IE_CEL_EVENT_TYPE, AST_EVENT_IE_CEL_EXTEN, AST_EVENT_IE_CEL_EXTRA, AST_EVENT_IE_CEL_LINKEDID, AST_EVENT_IE_CEL_PEER, AST_EVENT_IE_CEL_PEERACCT, AST_EVENT_IE_CEL_TENANTID, AST_EVENT_IE_CEL_UNIQUEID, AST_EVENT_IE_CEL_USEREVENT_NAME, AST_EVENT_IE_CEL_USERFIELD, AST_EVENT_IE_END, AST_EVENT_IE_PLTYPE_STR, AST_EVENT_IE_PLTYPE_UINT, ast_event_new(), ast_json_dump_string, ast_json_free(), ast_channel_snapshot::base, ast_channel_snapshot::caller, ast_channel_snapshot_dialplan::context, ast_channel_snapshot_dialplan::data, ast_channel_snapshot::dialplan, ast_channel_snapshot_caller::dnid, ast_channel_snapshot_dialplan::exten, ast_channel_snapshot_peer::linkedid, ast_channel_snapshot_caller::name, ast_channel_snapshot_base::name, NULL, ast_channel_snapshot_caller::number, ast_channel_snapshot::peer, RAII_VAR, ast_channel_snapshot_caller::rdnis, S_OR, ast_channel_snapshot_base::tenantid, ast_channel_snapshot_base::uniqueid, and ast_channel_snapshot_base::userfield.
Referenced by ast_cel_create_event(), and cel_report_event().
| struct ast_channel * ast_cel_fabricate_channel_from_event | ( | const struct ast_event * | event | ) | 
Create a fake channel from data in a CEL event.
| event | the CEL event | 
Definition at line 684 of file cel.c.
References ast_cel_event_record::account_code, ast_cel_event_record::amaflag, ast_party_caller::ani, ao2_cleanup, ao2_global_obj_ref, ast_cel_event_record::application_data, ast_cel_event_record::application_name, AST_CEL_EVENT_RECORD_VERSION, ast_cel_fill_record(), AST_CEL_USER_DEFINED, ast_channel_amaflags_set(), ast_channel_appl_set(), ast_channel_caller(), ast_channel_context_set(), ast_channel_data_set(), ast_channel_datastore_add(), ast_channel_dialed(), ast_channel_exten_set(), ast_channel_internal_set_fake_ids(), ast_channel_name_set(), ast_channel_redirecting(), ast_channel_unref, ast_channel_varshead(), ast_datastore_alloc, ast_datastore_free(), ast_dummy_channel_alloc, AST_LIST_INSERT_HEAD, ast_localtime(), ast_malloc, ast_strdup, ast_strftime(), ast_strlen_zero(), ast_var_assign, ast_cel_event_record::caller_id_ani, ast_cel_event_record::caller_id_dnid, ast_cel_event_record::caller_id_name, ast_cel_event_record::caller_id_num, ast_cel_event_record::caller_id_rdnis, ast_cel_event_record::channel_name, ast_cel_event_record::context, ast_datastore::data, ast_cel_event_record::event_name, ast_cel_event_record::event_time, ast_cel_event_record::event_type, ast_cel_event_record::extension, ast_cel_event_record::extra, fabricated_channel_datastore, ast_party_redirecting::from, ast_party_caller::id, ast_cel_event_record::linked_id, ast_party_id::name, NULL, ast_party_id::number, ast_party_dialed::number, ast_cel_event_record::peer, ast_cel_event_record::peer_account, RAII_VAR, ast_party_name::str, ast_party_number::str, ast_party_dialed::str, ast_cel_event_record::unique_id, ast_cel_event_record::user_defined_name, ast_cel_event_record::user_field, ast_party_name::valid, ast_party_number::valid, and ast_cel_event_record::version.
Referenced by custom_log(), and write_cel().
| 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.
| [in] | event | the CEL event | 
| [out] | r | the ast_cel_event_record to fill in | 
| 0 | success | 
| non-zero | failure | 
Definition at line 843 of file cel.c.
References ast_cel_event_record::account_code, ast_cel_event_record::amaflag, ast_cel_event_record::application_data, ast_cel_event_record::application_name, AST_CEL_EVENT_RECORD_VERSION, ast_cel_get_type_name(), ast_event_get_ie_str(), ast_event_get_ie_uint(), AST_EVENT_IE_CEL_ACCTCODE, AST_EVENT_IE_CEL_AMAFLAGS, AST_EVENT_IE_CEL_APPDATA, AST_EVENT_IE_CEL_APPNAME, AST_EVENT_IE_CEL_CHANNAME, AST_EVENT_IE_CEL_CIDANI, AST_EVENT_IE_CEL_CIDDNID, AST_EVENT_IE_CEL_CIDNAME, AST_EVENT_IE_CEL_CIDNUM, AST_EVENT_IE_CEL_CIDRDNIS, AST_EVENT_IE_CEL_CONTEXT, AST_EVENT_IE_CEL_EVENT_TIME, AST_EVENT_IE_CEL_EVENT_TIME_USEC, AST_EVENT_IE_CEL_EVENT_TYPE, AST_EVENT_IE_CEL_EXTEN, AST_EVENT_IE_CEL_EXTRA, AST_EVENT_IE_CEL_LINKEDID, AST_EVENT_IE_CEL_PEER, AST_EVENT_IE_CEL_PEERACCT, AST_EVENT_IE_CEL_TENANTID, AST_EVENT_IE_CEL_UNIQUEID, AST_EVENT_IE_CEL_USEREVENT_NAME, AST_EVENT_IE_CEL_USERFIELD, ast_log, ast_cel_event_record::caller_id_ani, ast_cel_event_record::caller_id_dnid, ast_cel_event_record::caller_id_name, ast_cel_event_record::caller_id_num, ast_cel_event_record::caller_id_rdnis, ast_cel_event_record::channel_name, ast_cel_event_record::context, ast_cel_event_record::event_name, ast_cel_event_record::event_time, ast_cel_event_record::event_type, ast_cel_event_record::extension, ast_cel_event_record::extra, ast_cel_event_record::linked_id, LOG_ERROR, ast_cel_event_record::peer, ast_cel_event_record::peer_account, S_OR, ast_cel_event_record::tenant_id, ast_cel_event_record::unique_id, ast_cel_event_record::user_defined_name, ast_cel_event_record::user_field, and ast_cel_event_record::version.
Referenced by ast_cel_fabricate_channel_from_event(), cel_bs_put(), manager_log(), odbc_log(), pgsql_log(), radius_log(), and tds_log().
| void * ast_cel_general_config_alloc | ( | void | ) | 
Allocate a CEL configuration object.
| NULL | on error | 
| The | new CEL configuration object | 
Definition at line 207 of file cel.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_str_container_alloc, ast_string_field_init, cel_general_config_dtor(), NULL, NUM_APP_BUCKETS, and RAII_VAR.
Referenced by cel_config_alloc(), and load_module().
| struct ast_cel_general_config * ast_cel_get_config | ( | void | ) | 
Obtain the current CEL configuration.
The configuration is a ref counted object. The caller of this function must decrement the ref count when finished with the configuration.
| NULL | on error | 
| The | current CEL configuration | 
Definition at line 1759 of file cel.c.
References ao2_cleanup, ao2_global_obj_ref, ao2_ref, NULL, and RAII_VAR.
Referenced by test_cel_init_cb().
| const char * ast_cel_get_type_name | ( | enum ast_cel_event_type | type | ) | 
Get the name of a CEL event type.
| type | the type to get the name of | 
Definition at line 514 of file cel.c.
References cel_event_types, S_OR, and type.
Referenced by ast_cel_fill_record(), cel_generic_cb(), dump_event(), and handle_cli_status().
| void ast_cel_publish_event | ( | struct ast_channel * | chan, | 
| enum ast_cel_event_type | event_type, | ||
| struct ast_json * | blob | ||
| ) | 
Publish a CEL event.
| chan | This is the primary channel associated with this channel event. | 
| event_type | This is the type of call event being reported. | 
| blob | This contains any additional parameters that need to be conveyed for this event. | 
Definition at line 1735 of file cel.c.
References ao2_cleanup, ast_cel_topic(), ast_channel_blob_create_from_cache(), ast_channel_uniqueid(), ast_json_pack(), ast_json_ref(), ast_json_unref(), cel_generic_type(), and stasis_publish().
Referenced by ast_cel_publish_user_event(), ast_stopstream(), ast_streamfile(), celgenuserevent_exec(), moh_post_start(), moh_post_stop(), and send_dtmf_end_event().
| void ast_cel_publish_user_event | ( | struct ast_channel * | chan, | 
| const char * | event, | ||
| const char * | extra | ||
| ) | 
Publish a CEL user event.
| chan | This is the primary channel associated with this channel event. | 
| event | This is the user event being reported. | 
| extra | This contains any extra parameters that need to be conveyed for this event. | 
Definition at line 1720 of file cel.c.
References ast_cel_publish_event(), AST_CEL_USER_DEFINED, ast_json_pack(), ast_json_unref(), NULL, RAII_VAR, and S_OR.
| void ast_cel_set_config | ( | struct ast_cel_general_config * | config | ) | 
Set the current CEL configuration.
| config | The new CEL configuration | 
Definition at line 1771 of file cel.c.
References ao2_bump, ao2_cleanup, ao2_global_obj_ref, ao2_ref, ast_cel_check_enabled(), config, create_routes(), destroy_routes(), cel_config::general, and is_enabled().
Referenced by cel_verify_and_cleanup_cb(), and test_cel_init_cb().
| enum ast_cel_event_type ast_cel_str_to_event_type | ( | const char * | name | ) | 
Get the event type from a string.
| name | the event type name as a string | 
Definition at line 441 of file cel.c.
References ARRAY_LEN, AST_CEL_INVALID_VALUE, ast_log, cel_event_types, LOG_ERROR, and name.
Referenced by events_handler().
| struct stasis_topic * ast_cel_topic | ( | void | ) | 
Get the CEL topic.
| The | CEL topic | 
| NULL | if not allocated | 
Definition at line 1754 of file cel.c.
References cel_topic.
Referenced by ast_cel_publish_event(), and create_subscriptions().
| 
 | static | 
Definition at line 455 of file cel.c.
References ao2_cleanup, ao2_global_obj_ref, and RAII_VAR.
Referenced by cel_channel_linkedid_change(), cel_channel_state_change(), and cel_report_event().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
| 
 | static | 
Definition at line 1335 of file cel.c.
References ast_attended_transfer_message::app, AST_ATTENDED_TRANSFER_DEST_APP, AST_ATTENDED_TRANSFER_DEST_BRIDGE_MERGE, AST_ATTENDED_TRANSFER_DEST_FAIL, AST_ATTENDED_TRANSFER_DEST_LINK, AST_ATTENDED_TRANSFER_DEST_LOCAL_APP, AST_ATTENDED_TRANSFER_DEST_THREEWAY, AST_CEL_ATTENDEDTRANSFER, ast_json_pack(), ast_json_unref(), ast_channel_snapshot::base, ast_bridge_channel_snapshot_pair::bridge_snapshot, cel_report_event(), ast_bridge_channel_snapshot_pair::channel_snapshot, ast_attended_transfer_message::dest, ast_attended_transfer_message::dest_type, ast_channel_snapshot_base::name, NULL, stasis_message_data(), stasis_message_timestamp(), ast_attended_transfer_message::target, ast_attended_transfer_message::to_transfer_target, ast_attended_transfer_message::to_transferee, ast_attended_transfer_message::transferee, ast_bridge_snapshot::uniqueid, and ast_channel_snapshot_base::uniqueid.
Referenced by create_routes().
| 
 | static | 
Definition at line 585 of file cel.c.
References cel_backend::callback.
Referenced by cel_report_event().
| 
 | static | 
Definition at line 1309 of file cel.c.
References AST_BRIDGE_TRANSFER_SUCCESS, AST_CEL_BLINDTRANSFER, ast_json_pack(), ast_json_unref(), ast_channel_snapshot::base, ast_blind_transfer_message::bridge, cel_report_event(), ast_blind_transfer_message::context, ast_blind_transfer_message::exten, ast_channel_snapshot_base::name, NULL, ast_blind_transfer_message::result, stasis_message_data(), stasis_message_timestamp(), ast_blind_transfer_message::transferee, ast_blind_transfer_message::transferer, ast_bridge_snapshot::uniqueid, and ast_channel_snapshot_base::uniqueid.
Referenced by create_routes().
| 
 | static | 
Definition at line 1068 of file cel.c.
References AST_CEL_BRIDGE_ENTER, ast_free, ast_json_pack(), ast_json_unref(), ast_str_buffer(), ast_bridge_blob::blob, ast_bridge_blob::bridge, cel_filter_channel_snapshot(), cel_generate_peer_str(), cel_report_event(), ast_bridge_blob::channel, NULL, RAII_VAR, stasis_message_data(), stasis_message_timestamp(), ast_bridge_snapshot::technology, and ast_bridge_snapshot::uniqueid.
Referenced by create_routes().
| 
 | static | 
Definition at line 1098 of file cel.c.
References AST_CEL_BRIDGE_EXIT, ast_free, ast_json_pack(), ast_json_unref(), ast_str_buffer(), ast_bridge_blob::blob, ast_bridge_blob::bridge, cel_filter_channel_snapshot(), cel_generate_peer_str(), cel_report_event(), ast_bridge_blob::channel, NULL, RAII_VAR, stasis_message_data(), stasis_message_timestamp(), ast_bridge_snapshot::technology, and ast_bridge_snapshot::uniqueid.
Referenced by create_routes().
| 
 | static | 
Definition at line 976 of file cel.c.
References ast_channel_snapshot_dialplan::appl, AST_CEL_APP_END, AST_CEL_APP_START, ast_strlen_zero(), cel_report_event(), ast_channel_snapshot::dialplan, and NULL.
| 
 | static | 
Definition at line 957 of file cel.c.
References ast_assert, AST_CEL_LINKEDID_END, ast_cel_track_event(), ast_strlen_zero(), cel_linkedid_ref(), check_retire_linkedid(), ast_channel_snapshot_peer::linkedid, and ast_channel_snapshot::peer.
| 
 | static | 
Handle channel state changes.
Definition at line 917 of file cel.c.
References ao2_cleanup, AST_CEL_ANSWER, AST_CEL_CHANNEL_END, AST_CEL_CHANNEL_START, AST_CEL_HANGUP, AST_CEL_LINKEDID_END, ast_cel_track_event(), AST_FLAG_DEAD, ast_json_pack(), ast_json_unref(), AST_STATE_UP, ast_test_flag, ast_channel_snapshot::base, ast_channel_snapshot_hangup::cause, cel_report_event(), check_retire_linkedid(), cel_dialstatus::dialstatus, ast_channel_snapshot::flags, get_dialstatus(), ast_channel_snapshot::hangup, NULL, ast_channel_snapshot_hangup::source, ast_channel_snapshot::state, and ast_channel_snapshot_base::uniqueid.
| 
 | static | 
Definition at line 243 of file cel.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_cel_general_config_alloc(), cel_config_dtor(), NULL, and RAII_VAR.
Referenced by load_module().
| 
 | static | 
Destructor for cel_config.
Definition at line 236 of file cel.c.
References ao2_cleanup, cel_config::general, and NULL.
Referenced by cel_config_alloc().
| 
 | static | 
Definition at line 1250 of file cel.c.
References AST_CEL_FORWARD, ast_json_pack(), ast_json_unref(), ast_multi_channel_blob_get_channel(), ast_strlen_zero(), ast_multi_channel_blob::blob, cel_filter_channel_snapshot(), cel_report_event(), get_blob_variable(), is_valid_dialstatus(), NULL, save_dialstatus(), stasis_message_data(), and stasis_message_timestamp().
Referenced by create_routes().
| 
 | static | 
Definition at line 1007 of file cel.c.
References AST_CHAN_TP_INTERNAL, ast_channel_snapshot::base, and ast_channel_snapshot_base::tech_properties.
Referenced by cel_bridge_enter_cb(), cel_bridge_leave_cb(), cel_dial_cb(), and cel_snapshot_update_cb().
| 
 | static | 
Destructor for cel_config.
Definition at line 199 of file cel.c.
References ao2_cleanup, ast_cel_general_config::apps, ast_string_field_free_memory, and NULL.
Referenced by ast_cel_general_config_alloc().
| 
 | static | 
Definition at line 1030 of file cel.c.
References ao2_cleanup, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_channel_snapshot_get_latest(), ast_str_append(), ast_str_create, ast_str_truncate(), ast_channel_snapshot::base, ast_bridge_snapshot::channels, ast_channel_snapshot_base::name, NULL, and ast_channel_snapshot_base::uniqueid.
Referenced by cel_bridge_enter_cb(), and cel_bridge_leave_cb().
| 
 | static | 
Definition at line 1277 of file cel.c.
References AST_CEL_DTMF, ast_cel_get_type_name(), AST_CEL_STREAM_BEGIN, AST_CEL_STREAM_END, AST_CEL_USER_DEFINED, ast_json_integer_get(), ast_json_object_get(), ast_json_string_get(), ast_log, ast_channel_blob::blob, cel_report_event(), LOG_ERROR, NULL, ast_channel_blob::snapshot, stasis_message_data(), and stasis_message_timestamp().
Referenced by create_routes().
| struct stasis_message_type * cel_generic_type | ( | void | ) | 
Referenced by ast_cel_publish_event(), create_routes(), load_module(), and unload_module().
| 
 | static | 
Definition at line 805 of file cel.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_log, ast_strlen_zero(), cel_linkedid::count, cel_linkedid::id, LOG_ERROR, NULL, OBJ_SEARCH_KEY, and RAII_VAR.
Referenced by cel_channel_linkedid_change(), and cel_report_event().
| 
 | static | 
Definition at line 1458 of file cel.c.
References AST_CEL_LOCAL_OPTIMIZE_BEGIN, cel_local_optimization_cb_helper(), and sub.
Referenced by create_routes().
| 
 | static | 
Definition at line 1423 of file cel.c.
References ast_json_pack(), ast_json_unref(), ast_multi_channel_blob_get_channel(), ast_channel_snapshot::base, cel_report_event(), ast_channel_snapshot_base::name, NULL, stasis_message_data(), stasis_message_timestamp(), and ast_channel_snapshot_base::uniqueid.
Referenced by cel_local_optimization_begin_cb(), and cel_local_optimization_end_cb().
| 
 | static | 
Definition at line 1448 of file cel.c.
References AST_CEL_LOCAL_OPTIMIZE, cel_local_optimization_cb_helper(), and sub.
Referenced by create_routes().
| 
 | static | 
Definition at line 1128 of file cel.c.
References AST_CEL_PARK_END, AST_CEL_PARK_START, ast_json_pack(), ast_json_unref(), ast_channel_snapshot::base, cel_report_event(), ast_parked_call_payload::event_type, ast_channel_snapshot_base::name, NULL, PARKED_CALL, PARKED_CALL_FAILED, PARKED_CALL_GIVEUP, PARKED_CALL_SWAP, PARKED_CALL_TIMEOUT, PARKED_CALL_UNPARKED, ast_parked_call_payload::parkee, ast_parked_call_payload::parker_dial_string, ast_parked_call_payload::parkinglot, RAII_VAR, ast_parked_call_payload::retriever, stasis_message_data(), and stasis_message_timestamp().
Referenced by create_routes().
| 
 | static | 
Definition at line 1398 of file cel.c.
References AST_CEL_PICKUP, ast_json_pack(), ast_json_unref(), ast_multi_channel_blob_get_channel(), ast_channel_snapshot::base, cel_report_event(), ast_channel_snapshot_base::name, NULL, stasis_message_data(), stasis_message_timestamp(), and ast_channel_snapshot_base::uniqueid.
Referenced by create_routes().
| 
 | static | 
Definition at line 295 of file cel.c.
References aco_pending_config(), ao2_container_count(), ast_cel_general_config::apps, AST_CEL_APP_END, AST_CEL_APP_START, ast_log, ast_cel_general_config::events, cel_config::general, and LOG_ERROR.
| 
 | static | 
Definition at line 593 of file cel.c.
References ao2_callback, ao2_cleanup, ao2_global_obj_ref, ast_channel_snapshot_dialplan::appl, AST_CEL_APP_END, AST_CEL_APP_START, AST_CEL_CHANNEL_START, ast_cel_create_event_with_time(), AST_CEL_LINKEDID_END, ast_cel_track_event(), ast_event_destroy(), cel_backend_send_cb(), cel_linkedid_ref(), cel_track_app(), ast_channel_snapshot::dialplan, ast_channel_snapshot_peer::linkedid, OBJ_MULTIPLE, OBJ_NODATA, ast_channel_snapshot::peer, and RAII_VAR.
Referenced by cel_attended_transfer_cb(), cel_blind_transfer_cb(), cel_bridge_enter_cb(), cel_bridge_leave_cb(), cel_channel_app_change(), cel_channel_state_change(), cel_dial_cb(), cel_generic_cb(), cel_local_optimization_cb_helper(), cel_parking_cb(), cel_pickup_cb(), and check_retire_linkedid().
| 
 | static | 
Definition at line 1015 of file cel.c.
References ARRAY_LEN, cel_channel_monitors, cel_filter_channel_snapshot(), stasis_message_data(), stasis_message_timestamp(), and update().
Referenced by create_routes().
| 
 | static | 
Definition at line 519 of file cel.c.
References ao2_cleanup, ao2_find, ao2_global_obj_ref, app, ast_str_to_lower(), ast_strdupa, NULL, OBJ_SEARCH_KEY, and RAII_VAR.
Referenced by cel_report_event().
| 
 | static | 
Definition at line 638 of file cel.c.
References ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_lock, ao2_ref, ao2_unlink, ao2_unlock, AST_CEL_LINKEDID_END, ast_log, ast_strlen_zero(), cel_report_event(), cel_linkedid::count, ast_channel_snapshot_peer::linkedid, LOG_ERROR, NULL, OBJ_SEARCH_KEY, ast_channel_snapshot::peer, and RAII_VAR.
Referenced by cel_channel_linkedid_change(), and cel_channel_state_change().
| CONFIG_INFO_CORE | ( | "cel" | , | 
| cel_cfg_info | , | ||
| cel_configs | , | ||
| cel_config_alloc | , | ||
| . | files = ACO_FILES(&cel_conf), | ||
| . | pre_apply_config = cel_pre_apply_config | ||
| ) | 
| 
 | static | 
Create the Stasis message router and routes for CEL.
Definition at line 1549 of file cel.c.
References ast_attended_transfer_type(), ast_blind_transfer_type(), ast_call_pickup_type(), ast_channel_dial_type(), ast_channel_entered_bridge_type(), ast_channel_left_bridge_type(), ast_channel_snapshot_type(), ast_local_optimization_begin_type(), ast_local_optimization_end_type(), ast_log, AST_LOG_ERROR, ast_parked_call_type(), AST_TASKPROCESSOR_HIGH_WATER_LEVEL, cel_aggregation_topic, cel_attended_transfer_cb(), cel_blind_transfer_cb(), cel_bridge_enter_cb(), cel_bridge_leave_cb(), cel_dial_cb(), cel_generic_cb(), cel_generic_type(), cel_local_optimization_begin_cb(), cel_local_optimization_end_cb(), cel_parking_cb(), cel_pickup_cb(), cel_snapshot_update_cb(), cel_state_router, NULL, stasis_message_router_add(), stasis_message_router_create, and stasis_message_router_set_congestion_limits().
Referenced by ast_cel_set_config(), load_module(), and reload_module().
| 
 | static | 
Create the Stasis subscriptions for CEL.
Definition at line 1503 of file cel.c.
References ast_bridge_topic_all(), ast_cel_topic(), ast_channel_topic_all(), ast_parking_topic(), cel_aggregation_topic, cel_bridge_forwarder, cel_cel_forwarder, cel_channel_forwarder, cel_parking_forwarder, cel_topic, stasis_forward_all(), and stasis_topic_create().
Referenced by load_module().
| 
 | static | 
Definition at line 1465 of file cel.c.
References cel_state_router, NULL, and stasis_message_router_unsubscribe_and_join().
Referenced by ast_cel_set_config(), reload_module(), and unload_module().
| 
 | static | 
Definition at line 1471 of file cel.c.
References ao2_cleanup, cel_aggregation_topic, cel_bridge_forwarder, cel_cel_forwarder, cel_channel_forwarder, cel_parking_forwarder, cel_topic, NULL, and stasis_forward_cancel().
Referenced by unload_module().
| 
 | static | 
Definition at line 466 of file cel.c.
References AST_CEL_ALL, AST_CEL_INVALID_VALUE, ast_cel_str_to_event_type(), ast_strdupa, ast_strip(), ast_strlen_zero(), events, ast_cel_general_config::events, strsep(), and var.
Referenced by load_module().
| 
 | static | 
Definition at line 901 of file cel.c.
References ast_json_object_get(), ast_json_string_get(), ast_multi_channel_blob_get_json(), and NULL.
Referenced by cel_dial_cb(), is_valid_dialstatus(), and save_dialstatus().
| 
 | static | 
Definition at line 889 of file cel.c.
References ao2_find, ao2_global_obj_ref, ao2_ref, cel_dialstatus::dialstatus, NULL, OBJ_SEARCH_KEY, OBJ_UNLINK, and cel_dialstatus::uniqueid.
Referenced by cel_channel_state_change().
| 
 | static | 
Definition at line 376 of file cel.c.
References a, ao2_cleanup, ao2_global_obj_ref, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, app, ast_cel_check_enabled(), ast_cel_get_type_name(), ast_cli(), CLI_GENERATE, CLI_HANDLER, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, cel_backend::name, name, NULL, RAII_VAR, and ast_cli_entry::usage.
| 
 | static | 
Definition at line 1221 of file cel.c.
References ast_strlen_zero(), cel_dialstatus::dialstatus, and get_blob_variable().
Referenced by cel_dial_cb().
| 
 | static | 
Definition at line 1625 of file cel.c.
References ACO_EXACT, aco_info_init(), aco_option_register, aco_option_register_custom, aco_process_config(), aco_set_defaults(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_cleanup, ao2_container_alloc_hash, ao2_global_obj_replace_unref, ao2_ref, apps_handler(), ast_cel_check_enabled(), ast_cli_register, ast_log, AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, BACKEND_BUCKETS, cel_config_alloc(), cel_generic_type(), cli_status, container, create_routes(), create_subscriptions(), events_handler(), FLDSET, cel_config::general, general_option, general_options, LOG_NOTICE, NULL, NUM_APP_BUCKETS, NUM_DIALSTATUS_BUCKETS, OPT_BOOL_T, OPT_STRINGFIELD_T, STASIS_MESSAGE_TYPE_INIT, and STRFLDSET.
| 
 | static | 
Definition at line 1696 of file cel.c.
References aco_process_config(), ACO_PROCESS_ERROR, ast_cel_check_enabled(), ast_verb, create_routes(), destroy_routes(), and is_enabled().
| 
 | static | 
Definition at line 1177 of file cel.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_link, ao2_ref, ao2_unlink, ast_copy_string(), ast_strlen_zero(), ast_channel_snapshot::base, cel_dialstatus::dialstatus, get_blob_variable(), NULL, OBJ_SEARCH_KEY, and ast_channel_snapshot_base::uniqueid.
Referenced by cel_dial_cb().
| STASIS_MESSAGE_TYPE_DEFN | ( | cel_generic_type | ) | 
| 
 | static | 
Definition at line 1484 of file cel.c.
References aco_info_destroy(), ao2_global_obj_release, ast_cli_unregister(), cel_generic_type(), cli_status, destroy_routes(), destroy_subscriptions(), and STASIS_MESSAGE_TYPE_CLEANUP.
| 
 | static | 
| 
 | static | 
| 
 | static | 
Aggregation topic for all topics CEL needs to know about
Definition at line 139 of file cel.c.
Referenced by create_routes(), create_subscriptions(), and destroy_subscriptions().
| 
 | static | 
Subscription for forwarding the channel caching topic
Definition at line 145 of file cel.c.
Referenced by create_subscriptions(), and destroy_subscriptions().
| 
 | static | 
Subscription for forwarding the CEL-specific topic
Definition at line 151 of file cel.c.
Referenced by create_subscriptions(), and destroy_subscriptions().
| 
 | static | 
Subscription for forwarding the channel caching topic
Definition at line 142 of file cel.c.
Referenced by create_subscriptions(), and destroy_subscriptions().
| cel_channel_snapshot_monitor cel_channel_monitors[] | 
Handlers for channel snapshot changes.
Definition at line 1001 of file cel.c.
Referenced by cel_snapshot_update_cb().
| 
 | static | 
The config file to be processed for the module.
Definition at line 283 of file cel.c.
| 
 | static | 
Map of ast_cel_event_type to strings.
Definition at line 324 of file cel.c.
Referenced by ast_cel_get_type_name(), and ast_cel_str_to_event_type().
| 
 | static | 
Subscription for forwarding the parking topic
Definition at line 148 of file cel.c.
Referenced by create_subscriptions(), and destroy_subscriptions().
| 
 | static | 
Message router for state that CEL needs to know about
Definition at line 133 of file cel.c.
Referenced by create_routes(), and destroy_routes().
| 
 | static | 
Topic for CEL-specific messages
Definition at line 136 of file cel.c.
Referenced by ast_cel_topic(), create_subscriptions(), and destroy_subscriptions().
| 
 | static | 
Definition at line 439 of file cel.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 679 of file cel.c.
Referenced by ast_cel_fabricate_channel_from_event().
| 
 | static | 
An aco_type structure to link the "general" category to the ast_cel_general_config type.
Definition at line 260 of file cel.c.
Referenced by load_module().
| 
 | static | 
Definition at line 319 of file cel.c.
Referenced by load_module().
| 
 | static | 
| 
 | static | 
Definition at line 275 of file cel.c.