Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] CDR_TDS tries to write to ends column instead of end


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
viljoens at verishare....
Guest





PostPosted: Tue Dec 23, 2014 2:34 am    Post subject: [asterisk-users] CDR_TDS tries to write to ends column inste Reply with quote

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


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
viljoens at verishare....
Guest





PostPosted: Tue Dec 23, 2014 2:55 am    Post subject: [asterisk-users] CDR_TDS tries to write to ends column inste Reply with quote

Hi all

<high embarrassment factor>

Managed to solve this. It wasn't Asterisk's fault, I had a trigger on the
ast_cdr table which was referrening to another table in my DB having an
"ends" column, when it should have been "end".

cdr_tds was literally just passing along the error it got from "deeper" in
the MSSQL table structure I'm using with Asterisk.

Sorry for the bother... all's fine now.

</high embarrassment factor>

Kind regards

Stefan


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services