diff --git a/CHANGES b/CHANGES index fc05ca43b7..e851eec760 100755 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,3 @@ - -- cdr_odbc - -- fix disposition to be stored as a string instead of an integer - -- NOTE: If you were already using cdr_odbc from a previous release, - you will need to make the necessary change to your db so that - it expects a string instead of an integer. Asterisk 1.0.3 -- chan_zap -- fix seg fault when doing *0 to flash a trunk diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c index ee9bcf893c..c28a329c9f 100755 --- a/cdr/cdr_odbc.c +++ b/cdr/cdr_odbc.c @@ -126,7 +126,7 @@ static int odbc_log(struct ast_cdr *cdr) SQLBindParameter(ODBC_stmt, 9, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, sizeof(cdr->lastdata), 0, cdr->lastdata, 0, NULL); SQLBindParameter(ODBC_stmt, 10, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->duration, 0, NULL); SQLBindParameter(ODBC_stmt, 11, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->billsec, 0, NULL); - SQLBindParameter(ODBC_stmt, 12, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_CHAR, strlen(ast_cdr_disp2str(cdr->disposition)) + 1, 0, ast_cdr_disp2str(cdr->disposition), 0, NULL); + SQLBindParameter(ODBC_stmt, 12, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->disposition, 0, NULL); SQLBindParameter(ODBC_stmt, 13, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &cdr->amaflags, 0, NULL); SQLBindParameter(ODBC_stmt, 14, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, sizeof(cdr->accountcode), 0, cdr->accountcode, 0, NULL); diff --git a/doc/cdr.txt b/doc/cdr.txt index 580619737e..dac7df30a4 100755 --- a/doc/cdr.txt +++ b/doc/cdr.txt @@ -88,7 +88,7 @@ MSSQL: Asterisk can currently store CDRs into an MSSQL database in [lastdata] [varchar] (80) NOT NULL , [duration] [int] NOT NULL , [billsec] [int] NOT NULL , - [disposition] [varchar] (45) NOT NULL , + [disposition] [int] NOT NULL , [amaflags] [int] NOT NULL , [accountcode] [varchar] (20) NOT NULL , [uniqueid] [varchar] (32) NOT NULL ,