I'm currently using Asterisk running version 1.2.5 and trying to use cdr_odbc to connect to a Microsoft SQL database. I have everything running, but the insert statement being sent to database doesn't appear to have the "start, answer, end" information in it. Below is the insert statement that MS Profiler shows being sent. As you can see those fields are missing. INSERT INTO cdr (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12,@P13,@P14) Here is the record that shows up in cdr-csv "","4718","2599576","default","""Asterisk2"" <4718>","SIP/4718-af52","IAX2/visioniax-1","Dial"," IAX2/visioniax/2599576@default","2006-03-29 10:29:23","2006-03-29 10:29:25","2006-03-29 10:29:34",11,9,"ANSWERED","DOCUMENTATION" that record looks fine. Please let me know if I'm missing anything here. Thanks, -Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060329/d72ae377/attachment.htm
Nathan Bowyer
2006-Mar-29 14:10 UTC
[Asterisk-Users] cdr_odbc appears to have fields missing
On 3/29/06, Brian Roy <mister.roy@gmail.com> wrote:> > I'm currently using Asterisk running version 1.2.5 and trying to use > cdr_odbc to connect to a Microsoft SQL database. I have everything running, > but the insert statement being sent to database doesn't appear to have the > "start, answer, end" information in it. > > Below is the insert statement that MS Profiler shows being sent. As you can > see those fields are missing. > > INSERT INTO cdr > (calldate,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode) > VALUES >When I look at the code, in this case calldate is actually the cdr->start value. I'm working on a patch to record answer and end as well. Nathan