Custom Comma Separated Value CEL records. 
- Author
- Steve Murphy murf@.nosp@m.digi.nosp@m.um.co.nosp@m.m Logs in LOG_DIR/cel_custom 
Definition in file cel_custom.c.
  
  | 
        
          | static void custom_log | ( | struct ast_event * | event | ) |  |  | static | 
 
Definition at line 127 of file cel_custom.c.
  128{
  132 
  133    
  135        return;
  136    }
  137 
  141        return;
  142    }
  143 
  145 
  148 
  150 
  151        
  152
  153
  154
  156 
  157        
  158
  159
  160        if ((
out = fopen(
config->filename, 
"a"))) {
 
  164        } else {
  166        }
  167 
  169    }
  170 
  172 
  174}
struct ast_channel * ast_cel_fabricate_channel_from_event(const struct ast_event *event)
Create a fake channel from data in a CEL event.
static const char config[]
static void dummy(char *unused,...)
#define ast_channel_unref(c)
Decrease channel reference count.
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define ast_mutex_unlock(a)
#define ast_mutex_lock(a)
void ast_str_substitute_variables(struct ast_str **buf, ssize_t maxlen, struct ast_channel *chan, const char *templ)
char *attribute_pure ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
Main Channel structure associated with a channel.
Support for dynamic strings.
A container that holds all config-related information.
struct cel_config::@111 list
References ast_cel_fabricate_channel_from_event(), ast_channel_unref, AST_LIST_TRAVERSE, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_substitute_variables(), ast_str_thread_get(), config, dummy(), errno, cel_config::list, LOG_ERROR, out, and str.
Referenced by load_module().
 
 
  
  | 
        
          | static int load_config | ( | void |  | ) |  |  | static | 
 
Definition at line 76 of file cel_custom.c.
   77{
   82    int res = 0;
   83 
   87        return -1;
   88    }
   89 
   92    }
   93 
   97 
   98            if (!sink) {
   99                ast_log(
LOG_ERROR, 
"Unable to allocate memory for configuration settings.\n");
 
  100                res = -2;
  101                break;
  102            }
  103 
  105            if (
var->name[0] == 
'/') {
 
  107            } else {
  109            }
  111 
  115        } else {
  116            ast_log(
LOG_NOTICE, 
"Mapping must have both a filename and a format at line %d\n", 
var->lineno);
 
  117        }
  119    }
  121 
  123 
  124    return res;
  125}
#define ast_config_load(filename, flags)
Load a config file.
#define CONFIG_STATUS_FILEINVALID
void ast_config_destroy(struct ast_config *cfg)
Destroys a config.
struct ast_variable * ast_variable_browse(const struct ast_config *config, const char *category_name)
#define ast_verb(level,...)
#define AST_RWLIST_INSERT_TAIL
#define ast_mutex_init(pmutex)
const char * ast_config_AST_LOG_DIR
#define ast_calloc_with_stringfields(n, type, size)
Allocate a structure with embedded stringfields in a single allocation.
#define ast_string_field_build(x, field, fmt, args...)
Set a field to a complex (built) value.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Structure used to handle boolean flags.
Structure for variables, used for configurations and for channel variables.
const ast_string_field filename
const ast_string_field format
References ast_calloc_with_stringfields, ast_config_AST_LOG_DIR, ast_config_destroy(), ast_config_load, ast_log, ast_mutex_init, AST_RWLIST_INSERT_TAIL, ast_string_field_build, ast_strlen_zero(), ast_variable_browse(), ast_verb, CONFIG, CONFIG_STATUS_FILEINVALID, cel_config::filename, cel_config::format, cel_config::list, cel_config::lock, LOG_ERROR, LOG_NOTICE, name, and var.
Referenced by load_module(), and reload().