aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 15:28:53 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-26 15:28:53 +0000
commitac3b35dcc792329046ec2532ff204962c895ee98 (patch)
treea28e9113cf1daf97e45a8fc6d41a52c76ac69836 /cdr
parentd13a40e1cfe5f54bfb4d1aacd2c63e7859e010bc (diff)
Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r--cdr/cdr_custom.c2
-rw-r--r--cdr/cdr_manager.c2
-rw-r--r--cdr/cdr_sqlite.c8
-rw-r--r--cdr/cdr_sqlite3_custom.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c
index c045241d9..0a88f3d65 100644
--- a/cdr/cdr_custom.c
+++ b/cdr/cdr_custom.c
@@ -124,7 +124,7 @@ static int custom_log(struct ast_cdr *cdr)
return -1;
}
- dummy = ast_channel_alloc(0, 0, "", "", "", "", "", 0, "Substitution/%p", cdr);
+ dummy = ast_dummy_channel_alloc();
if (!dummy) {
ast_log(LOG_ERROR, "Unable to allocate channel for variable subsitution.\n");
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c
index 83e6054dd..49e99796a 100644
--- a/cdr/cdr_manager.c
+++ b/cdr/cdr_manager.c
@@ -156,7 +156,7 @@ static int manager_log(struct ast_cdr *cdr)
buf[0] = '\0';
ast_rwlock_rdlock(&customfields_lock);
if (customfields && ast_str_strlen(customfields)) {
- struct ast_channel *dummy = ast_channel_alloc(0, 0, "", "", "", "", "", 0, "Substitution/%p", cdr);
+ struct ast_channel *dummy = ast_dummy_channel_alloc();
if (!dummy) {
ast_log(LOG_ERROR, "Unable to allocate channel for variable substitution.\n");
return 0;
diff --git a/cdr/cdr_sqlite.c b/cdr/cdr_sqlite.c
index 8eecee453..a5eb54f22 100644
--- a/cdr/cdr_sqlite.c
+++ b/cdr/cdr_sqlite.c
@@ -184,7 +184,7 @@ static int load_module(void)
if (!db) {
ast_log(LOG_ERROR, "cdr_sqlite: %s\n", zErr);
ast_free(zErr);
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
/* is the table there? */
@@ -203,14 +203,14 @@ static int load_module(void)
res = ast_cdr_register(name, ast_module_info->description, sqlite_log);
if (res) {
ast_log(LOG_ERROR, "Unable to register SQLite CDR handling\n");
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
err:
if (db)
sqlite_close(db);
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "SQLite CDR Backend");
diff --git a/cdr/cdr_sqlite3_custom.c b/cdr/cdr_sqlite3_custom.c
index fd2d3e476..6f1961c51 100644
--- a/cdr/cdr_sqlite3_custom.c
+++ b/cdr/cdr_sqlite3_custom.c
@@ -241,7 +241,7 @@ static int sqlite3_log(struct ast_cdr *cdr)
struct ast_channel *dummy;
struct ast_str *value_string = ast_str_create(1024);
- dummy = ast_channel_alloc(0, 0, "", "", "", "", "", 0, "Substitution/%p", cdr);
+ dummy = ast_dummy_channel_alloc();
if (!dummy) {
ast_log(LOG_ERROR, "Unable to allocate channel for variable subsitution.\n");
ast_free(value_string);