aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-30 04:41:18 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-05-30 04:41:18 +0000
commit960085b93effa2e60a104fd1dc7c285e8a17b43f (patch)
treece152fc7452bf039617bdb5fd213d37645419c97 /cdr
parentbe1aaf406e36e94633fd6609cf648b56ed841386 (diff)
Add unique identifier
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1064 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rwxr-xr-xcdr/cdr_csv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c
index 8031b4abe..4531aab59 100755
--- a/cdr/cdr_csv.c
+++ b/cdr/cdr_csv.c
@@ -27,6 +27,8 @@
#define DATE_FORMAT "%Y-%m-%d %T"
+/* #define CSV_LOGUNIQUEID 1 */
+
#include <stdio.h>
#include <string.h>
@@ -57,7 +59,7 @@
// "end time" minus "answer time"
"disposition", // ANSWERED, NO ANSWER, BUSY
"amaflags", // DOCUMENTATION, BILL, IGNORE etc, specified on a per channel basis like accountcode.
-
+ "uniqueid", // unique call identifier
*/
static char *desc = "Comma Separated Values CDR Backend";
@@ -158,6 +160,10 @@ static int build_csv_record(char *buf, int len, struct ast_cdr *cdr)
/* AMA Flags */
append_string(buf, ast_cdr_flags2str(cdr->amaflags), len);
+#ifdef CSV_LOGUNIQUEID
+ /* Unique ID */
+ append_string(buf, cdr->uniqueid, len);
+#endif
/* If we hit the end of our buffer, log an error */
if (strlen(buf) < len - 5) {
/* Trim off trailing comma */