From: Richard Mudgett Date: Fri, 13 Jan 2012 17:23:57 +0000 (+0000) Subject: Use compatible names for event extra data for various CEL backends. X-Git-Tag: 1.8.10.0-rc1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26966a5cd8519c61c5a66222afafb86a9c613b42;p=thirdparty%2Fasterisk.git Use compatible names for event extra data for various CEL backends. * Change eventextra to extra in cel_psql.c and cel_odbc.c. * Change EventExtra to Extra in cel_manager.c. (issue ASTERISK-17190) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@350571 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/cel/cel_manager.c b/cel/cel_manager.c index d97bfe9bb5..76ca48bbb7 100644 --- a/cel/cel_manager.c +++ b/cel/cel_manager.c @@ -92,7 +92,7 @@ static void manager_log(const struct ast_event *event, void *userdata) "Userfield: %s\r\n" "Peer: %s\r\n" "PeerAccount: %s\r\n" - "EventExtra: %s\r\n", + "Extra: %s\r\n", record.event_name, record.account_code, record.caller_id_num, diff --git a/cel/cel_odbc.c b/cel/cel_odbc.c index b6ed619f3e..223cb18c99 100644 --- a/cel/cel_odbc.c +++ b/cel/cel_odbc.c @@ -438,7 +438,7 @@ static void odbc_log(const struct ast_event *event, void *userdata) ast_copy_string(colbuf, record.peer, sizeof(colbuf)); } else if (strcmp(entry->celname, "amaflags") == 0) { snprintf(colbuf, sizeof(colbuf), "%d", record.amaflag); - } else if (strcmp(entry->celname, "eventextra") == 0) { + } else if (strcmp(entry->celname, "extra") == 0) { ast_copy_string(colbuf, record.extra, sizeof(colbuf)); } else { colbuf[0] = 0; diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c index a6d1d16a91..99374a824e 100644 --- a/cel/cel_pgsql.c +++ b/cel/cel_pgsql.c @@ -234,7 +234,7 @@ static void pgsql_log(const struct ast_event *event, void *userdata) value = record.user_field; } else if (strcmp(cur->name, "peer") == 0) { value = record.peer; - } else if (strcmp(cur->name, "eventextra") == 0) { + } else if (strcmp(cur->name, "extra") == 0) { value = record.extra; } else { value = NULL; diff --git a/configs/cel_odbc.conf.sample b/configs/cel_odbc.conf.sample index 6e584e5b4f..68d3b0adb2 100644 --- a/configs/cel_odbc.conf.sample +++ b/configs/cel_odbc.conf.sample @@ -47,7 +47,6 @@ ; CEL_FORWARD = 25 ; eventtime (timeval, includes microseconds) ; userdeftype (set only if eventtype == USER_DEFINED) -; eventextra ; cid_name ; cid_num ; cid_ani @@ -65,6 +64,7 @@ ; amaflags (an int) ; userfield ; peer +; extra ; The point of this module is to allow you log whatever you like in terms of the ; CEL variables. Do you want to log uniqueid? Then simply ensure that your diff --git a/configs/cel_pgsql.conf.sample b/configs/cel_pgsql.conf.sample index 2d79941bf5..79ea14475f 100644 --- a/configs/cel_pgsql.conf.sample +++ b/configs/cel_pgsql.conf.sample @@ -34,7 +34,6 @@ ; CEL_FORWARD = 25 ; eventtime (timeval, includes microseconds) ; userdeftype (set only if eventtype == USER_DEFINED) -; eventextra ; cid_name ; cid_num ; cid_ani @@ -52,6 +51,7 @@ ; amaflags (an int) ; userfield ; peer +; extra [global]