[asterisk-users] CDR_TDS tries to write to ends column instead of end
Stefan Viljoen
viljoens at verishare.co.za
Tue Dec 23 01:32:48 CST 2014
Hi all
I'm trying to get Asterisk 1.8.11.0 to write to the ast_cdr table on an
MSSQL instance.
My problem is that the cdr_tds module insists on naming the end column as
"ends" - it tries to write to this column, which does not exist.
I get this in the CLI:
[Dec 23 09:25:17] NOTICE[2545]: cdr_tds.c:476 tds_message_handler: Invalid
column name 'ends'.
[Dec 23 09:25:17] ERROR[2545]: cdr_tds.c:464 tds_error_handler: General SQL
Server error: Check messages from the SQL Server (207)
[Dec 23 09:25:17] NOTICE[2545]: cdr_tds.c:476 tds_message_handler: Invalid
column name 'ends'.
[Dec 23 09:25:17] ERROR[2545]: cdr_tds.c:464 tds_error_handler: General SQL
Server error: Check messages from the SQL Server (207)
[Dec 23 09:25:17] NOTICE[2545]: cdr_tds.c:266 tds_log: Failed to execute
INSERT statement, retrying...
I executed this (as indicated in cdr_tds.c) to create the table:
CREATE TABLE [dbo].[cdr] (
[accountcode] [varchar] (20) NULL ,
[src] [varchar] (80) NULL ,
[dst] [varchar] (80) NULL ,
[dcontext] [varchar] (80) NULL ,
[clid] [varchar] (80) NULL ,
[channel] [varchar] (80) NULL ,
[dstchannel] [varchar] (80) NULL ,
[lastapp] [varchar] (80) NULL ,
[lastdata] [varchar] (80) NULL ,
[start] [datetime] NULL ,
[answer] [datetime] NULL ,
[end] [datetime] NULL ,
[duration] [int] NULL ,
[billsec] [int] NULL ,
[disposition] [varchar] (20) NULL ,
[amaflags] [varchar] (16) NULL ,
[uniqueid] [varchar] (32) NULL ,
[userfield] [varchar] (256) NULL
) ON [PRIMARY]
So it definitely exists as "end" -NOT- "ends" - how can I get Asterisk to
write to just "end" as it is supposed to? For end time for the CDR?
Thanks
Stefan
More information about the asterisk-users
mailing list