projects
/
asterisk/asterisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Log cdr user data, if enabled
[asterisk/asterisk.git]
/
cdr
/
cdr_odbc.c
diff --git
a/cdr/cdr_odbc.c
b/cdr/cdr_odbc.c
index
fddd688
..
cfe2864
100755
(executable)
--- a/
cdr/cdr_odbc.c
+++ b/
cdr/cdr_odbc.c
@@
-73,8
+73,8
@@
static int odbc_log(struct ast_cdr *cdr)
{
sprintf(sqlcmd,"INSERT INTO cdr "
"(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
{
sprintf(sqlcmd,"INSERT INTO cdr "
"(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
- "lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) "
- "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
+ "lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) "
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
}
else
{
}
else
{
@@
-144,6
+144,7
@@
static int odbc_log(struct ast_cdr *cdr)
if((loguniqueid != NULL) && ((strcmp(loguniqueid, "1") == 0) || (strcmp(loguniqueid, "yes") == 0)))
{
SQLBindParameter(ODBC_stmt, 15, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 0, 0, cdr->uniqueid, 0, NULL);
if((loguniqueid != NULL) && ((strcmp(loguniqueid, "1") == 0) || (strcmp(loguniqueid, "yes") == 0)))
{
SQLBindParameter(ODBC_stmt, 15, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 0, 0, cdr->uniqueid, 0, NULL);
+ SQLBindParameter(ODBC_stmt, 16, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 0, 0, cdr->userfield, 0, NULL);
}
if(connected)
}
if(connected)