aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-18 05:38:11 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-18 05:38:11 +0000
commit47386acd8ef9657a88284b2a5690b9f7bd717d96 (patch)
treee755b1a7e87bec285fe450d58da0eaf5354d7538 /cdr
parent12c9c895c5fbae01dcf8193e06aa733c9ecf4e81 (diff)
optionally log uniqueid as well
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1198 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rwxr-xr-xcdr/cdr_mysql.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cdr/cdr_mysql.c b/cdr/cdr_mysql.c
index 9d8ff3f43..ccdfc163c 100755
--- a/cdr/cdr_mysql.c
+++ b/cdr/cdr_mysql.c
@@ -56,8 +56,11 @@ static int mysql_log(struct ast_cdr *cdr)
ast_log(LOG_DEBUG,"cdr_mysql: inserting a CDR record.\n");
+#ifdef MYSQL_LOGUNIQUEID
+ sprintf(sqlcmd,"INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,%i,%i,'%s','%s')",timestr,cdr->clid,cdr->src, cdr->dst, cdr->dcontext,cdr->channel, cdr->dstchannel, cdr->lastapp, cdr->lastdata,cdr->duration,cdr->billsec,cdr->disposition,cdr->amaflags, cdr->accountcode, cdr->uniqueid);
+#else
sprintf(sqlcmd,"INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,%i,%i,'%s')",timestr,cdr->clid,cdr->src, cdr->dst, cdr->dcontext,cdr->channel, cdr->dstchannel, cdr->lastapp, cdr->lastdata,cdr->duration,cdr->billsec,cdr->disposition,cdr->amaflags, cdr->accountcode);
-
+#endif
ast_log(LOG_DEBUG,"cdr_mysql: SQL command as follows: %s\n",sqlcmd);
if (mysql_real_query(mysql,sqlcmd,strlen(sqlcmd)))