211 #define CEL_AMI_ENABLED_DEFAULT 0 216 #define CEL_SHOW_USERDEF_DEFAULT 0 218 #define MANAGER_BACKEND_NAME "Manager Event Logging" 226 char start_time[80] =
"";
227 char user_defined_header[160];
228 const char *event_name;
245 user_defined_header[0] =
'\0';
248 snprintf(user_defined_header,
sizeof(user_defined_header),
257 "AccountCode: %s\r\n" 258 "CallerIDnum: %s\r\n" 259 "CallerIDname: %s\r\n" 260 "CallerIDani: %s\r\n" 261 "CallerIDrdnis: %s\r\n" 262 "CallerIDdnid: %s\r\n" 266 "Application: %s\r\n" 274 "PeerAccount: %s\r\n" 302 const char *cat =
NULL;
315 ast_log(
LOG_WARNING,
"Configuration file '%s' is invalid. CEL manager Module not activated.\n",
320 ast_log(
LOG_WARNING,
"Failed to load configuration file. CEL manager Module not activated.\n");
326 if (strcasecmp(cat,
"manager")) {
331 if (!strcasecmp(v->
name,
"enabled")) {
333 }
else if (!strcasecmp(v->
name,
"show_user_defined")) {
337 "for cel_manager.\n", v->
name);
349 ast_log(
LOG_ERROR,
"Unable to register Asterisk Call Manager CEL handling\n");
const char * account_code
struct ast_variable * next
const char * caller_id_name
Helper struct for getting the fields out of a CEL event.
Asterisk main include file. File version handling, generic pbx functions.
static int unload_module(void)
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category_name)
const char * user_defined_name
int ast_cel_backend_register(const char *name, ast_cel_backend_cb backend_callback)
Register a CEL backend.
const char * application_data
const char * application_name
#define CONFIG_STATUS_FILEINVALID
struct ast_tm * ast_localtime(const struct timeval *timep, struct ast_tm *p_tm, const char *zone)
Timezone-independent version of localtime_r(3).
Structure for variables, used for configurations and for channel variables.
const char * ast_channel_amaflags2string(enum ama_flags flags)
Convert the enum representation of an AMA flag to a string representation.
#define CEL_AMI_ENABLED_DEFAULT
AMI CEL is off by default.
static const char CONF_FILE[]
const char * caller_id_num
char * ast_category_browse(struct ast_config *config, const char *prev_name)
Browse categories.
#define CEL_SHOW_USERDEF_DEFAULT
show_user_def is off by default
Configuration File Parser.
#define ast_config_load(filename, flags)
Load a config file.
General Asterisk PBX channel definitions.
static unsigned char cel_show_user_def
static void manager_log(struct ast_event *event)
void ast_config_destroy(struct ast_config *config)
Destroys a config.
uint32_t version
struct ABI version
static int load_module(void)
int ast_cel_backend_unregister(const char *name)
Unregister a CEL backend.
#define CONFIG_STATUS_FILEUNCHANGED
enum ast_cel_event_type event_type
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
static int load_config(int reload)
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
const char * caller_id_rdnis
Module has failed to load, may be in an inconsistent state.
int ast_strftime(char *buf, size_t len, const char *format, const struct ast_tm *tm)
Special version of strftime(3) that handles fractions of a second. Takes the same arguments as strfti...
const char * caller_id_ani
#define AST_CEL_EVENT_RECORD_VERSION
struct ABI version
Structure used to handle boolean flags.
Support for logging to various files, console and syslog Configuration in file logger.conf.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
const char * peer_account
static const char DATE_FORMAT[]
a user-defined event, the event name field should be set
const char * caller_id_dnid
const char * channel_name
#define ASTERISK_GPL_KEY
The text the key() function should return.
#define manager_event(category, event, contents,...)
External routines may send asterisk manager events this way.
Asterisk module definitions.
struct timeval event_time
#define MANAGER_BACKEND_NAME
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.