mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 03:59:01 +00:00
Fix PGSQL CDR issue (bug #3028)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -99,7 +99,12 @@ static int pgsql_log(struct ast_cdr *cdr)
|
|||||||
|
|
||||||
ast_log(LOG_DEBUG,"cdr_pgsql: inserting a CDR record.\n");
|
ast_log(LOG_DEBUG,"cdr_pgsql: inserting a CDR record.\n");
|
||||||
|
|
||||||
snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s','%s')",table,timestr,clid,cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata,cdr->duration,cdr->billsec,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode, uniqueid, userfield);
|
snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,"
|
||||||
|
"lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES"
|
||||||
|
" ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%i,%i,'%s',%i,'%s','%s','%s')",
|
||||||
|
table,timestr,clid,cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata,
|
||||||
|
cdr->duration,cdr->billsec,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode, uniqueid, userfield);
|
||||||
|
|
||||||
ast_log(LOG_DEBUG,"cdr_pgsql: SQL command executed: %s\n",sqlcmd);
|
ast_log(LOG_DEBUG,"cdr_pgsql: SQL command executed: %s\n",sqlcmd);
|
||||||
|
|
||||||
/* Test to be sure we're still connected... */
|
/* Test to be sure we're still connected... */
|
||||||
|
Reference in New Issue
Block a user