mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 08:13:22 +00:00
Log cdr user data, if enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -73,8 +73,8 @@ static int odbc_log(struct ast_cdr *cdr)
|
|||||||
{
|
{
|
||||||
sprintf(sqlcmd,"INSERT INTO cdr "
|
sprintf(sqlcmd,"INSERT INTO cdr "
|
||||||
"(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
|
"(calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,"
|
||||||
"lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid) "
|
"lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) "
|
||||||
"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
"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)))
|
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, 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)
|
||||||
|
Reference in New Issue
Block a user