Skip to content
Snippets Groups Projects
Commit 27b54b8d authored by Martin Pycko's avatar Martin Pycko
Browse files

Fix the 'disposition' field so that we have ANSWERED, NO ANSWERED, BUSY strings instead of 0,1,3

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 3fabe900
Branches
Tags
No related merge requests found
...@@ -57,9 +57,9 @@ static int mysql_log(struct ast_cdr *cdr) ...@@ -57,9 +57,9 @@ static int mysql_log(struct ast_cdr *cdr)
ast_log(LOG_DEBUG,"cdr_mysql: inserting a CDR record.\n"); ast_log(LOG_DEBUG,"cdr_mysql: inserting a CDR record.\n");
#ifdef MYSQL_LOGUNIQUEID #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); 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,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode, cdr->uniqueid);
#else #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); 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,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode);
#endif #endif
ast_log(LOG_DEBUG,"cdr_mysql: SQL command as follows: %s\n",sqlcmd); ast_log(LOG_DEBUG,"cdr_mysql: SQL command as follows: %s\n",sqlcmd);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment