|Summary:||ASTERISK-06668: [patch] billsec and duration record only max int (x86_64)|
|Date Opened:||2006-03-30 15:42:15.000-0600||Date Closed:||2006-06-08 09:15:47|
|Environment:||Attachments:||( 0) 20060410__bug6851.diff.txt|
( 1) cdr_odbc_64bitint.patch
( 2) cdr_odbc.c.diff
|Description:||I noticed this yesterday when I was working on adding the 'answer' and 'end' fields to my cdr_odbc. On my machine (Athlon64, CentOS 4.3 x86_64), with an unmodified cdr_odbc, max int gets recorded for each the billsec and duration fields, disregarding the actual length of the call. I'm using cdr_odbc to talk to ODBC which records in a mysql DB backend.|
|Comments:||By: Andrey S Pankov (casper) 2006-03-30 16:31:05.000-0600|
x86_64 or amd64? (uname -m)
Maybe ODBC problem, what ODBC variant are you using?
By: alric (alric) 2006-03-30 16:33:23.000-0600
x86_64. unixODBC 2.2.11. It could very well be an ODBC problem, I have no idea where it is.
By: Tilghman Lesher (tilghman) 2006-03-30 16:44:04.000-0600
I'd expect you to have the same problem with amaflags and disposition, unless amaflags was 0 and/or you had set up dispositionstring=yes in cdr_odbc.conf.
By: Andrey S Pankov (casper) 2006-03-30 16:46:16.000-0600
You may try to look at this to see what needs to be changed:
Look at the patches provided in .sprm package...
Anyway I'm not sure (have never tried) if that helps.
By: alric (alric) 2006-03-30 17:02:57.000-0600
Actually, I do have dispositionstring=yes.
By: Andrey S Pankov (casper) 2006-04-10 13:41:58
Did recompilation of unixODBC with x86_64 support helped?
By: alric (alric) 2006-04-10 14:01:47
I'm using the RPM package of unixODBC, but it says its x86_64.
unixODBC.x86_64 - 2.2.11-1.RHEL4.1
By: alric (alric) 2006-04-10 14:06:32
Here's an example record:
| 2006-04-10 14:04:22 | "Line 1" <nathan> | nathan | 100 | from-sip | SIP/nathan-13be | | Playback | tt-monkeys | 2147483647 | 2147483647 | ANSWERED | 3 | | 1144695862.1 | |
The 3 is amaflags. Row order is: calldate, clid, src, dst, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield.
By: Andrey S Pankov (casper) 2006-04-10 14:34:30
Can you post the same record form cdr_csv?
Please 'set verbose 11' to see cdr_odbc logs. Maybe there will be smth interesting there...
By: alric (alric) 2006-04-10 15:12:09
cdr_odbc merely reports that the query was successful with 11 verbosity.
Record from cdr_csv:
"","nathan","100","from-sip","""Line 1"" <nathan>","SIP/nathan-13be","","Playback","tt-monkeys","2006-04-10 14:04:22","2006-04-
10 14:04:22","2006-04-10 14:04:29",7,7,"ANSWERED","DOCUMENTATION"
By: Andrey S Pankov (casper) 2006-04-10 15:43:23
Please try the patch. Disclaimer is on file.
By: alric (alric) 2006-04-10 15:58:03
Same results it looks like.
By: Andrey S Pankov (casper) 2006-04-10 16:17:58
Did you try to look at altlinux/sisyphus patches?
By: Tilghman Lesher (tilghman) 2006-04-10 22:54:02
Alric: please try this patch. I hate to have to do this to you, but since so few of the developers have 64-bit machines, it's difficult to pre-test these patches before we ask you to try them for yourself.
By: alric (alric) 2006-04-11 07:42:04
Thats fine with me. The only 64-bit box I have is a development box anyway. I don't mind hacking it up.
I can test it later today and get back to you then.
By: Serge Vecher (serge-v) 2006-05-04 10:28:43
Alric: did you try Corydon's patch?
By: Donny Kavanagh (donnyk) 2006-05-25 17:55:01
Is your database server, on the same server or different?
Assuming different, is it 64bit?
By: Serge Vecher (serge-v) 2006-05-25 20:51:26
north: I think you wanted a reminder to try this at home ...
By: Donny Kavanagh (donnyk) 2006-05-26 00:28:00
See the latest patch (cdr_odbc_64bitint.patch), probally a better solution. Its pretty much un-tested but it should be ok.
By: alric (alric) 2006-05-26 15:36:10
Just tried Corydon's patch, and after applying, I get no CDRs. Just says query failed, then tries again, and fails again. This is at verbosity 11.
By: alric (alric) 2006-05-26 17:56:42
Spoke too soon on this. Looks like my machine had freaked out for no apparent reason :/ Disregard that last comment. On a side note, on a clean 188.8.131.52 I'm getting correct billsecs / duration now. Going to see if anything changed in the database layers recently...
By: Serge Vecher (serge-v) 2006-06-02 10:02:51
alric: so the problem is gone now? Any difference with the patch applied to the latest 1.2.8 sources?
By: alric (alric) 2006-06-08 07:38:13
Yeah, I just tested everything out again and it looks like the problem is gone. I don't think any the unixODBC or MyODBC code changed. This is on clean 184.108.40.206.
By: Serge Vecher (serge-v) 2006-06-08 09:15:28
Alric: thanks for reporting; closing the issue since the problem is mysteriously resolved. Please feel free to reopen the issue if it resurfaces again and you know how to track it down. Thanks.