[Home]

Summary:ASTERISK-23741: CDR answer field takes value from previous field
Reporter:Grigoriy Puzankin (boroda)Labels:
Date Opened:2014-05-14 08:49:09Date Closed:2014-06-25 08:54:45
Priority:MinorRegression?
Status:Closed/CompleteComponents:CDR/cdr_adaptive_odbc
Versions:11.9.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Gentoo Linux with the latest stable portage updates, kernel 3.12.13 x86_64, PostgreSQL 9.3.3, unixODBC 2.3.1.Attachments:( 0) issue_23741_full_log
Description:In some cases when a call was not answered the "answer" field may take timestamp value from "calldate", "end" or whatever was filled prior to "answer" field.

For example, create a CDR table, where three specific columns go in row "calldate", "answer" and "end" (create other fields according to documentation). Make call, but do not answer. Fetch your call from CDR table. The "answer" field should be empty, but it is filled with the same value as the "calldate" was filled.

If non-timestamp field goes prior to "answer", then the "answer" field will be empty, but there'll be a warning in logs about bad formatted date (with the value from previous column - WARNING[12951] cdr_adaptive_odbc.c: CDR variable callanswer is not a valid timestamp ('6209').).
Comments:By: Matt Jordan (mjordan) 2014-05-14 09:13:49.961-0500

We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Grigoriy Puzankin (boroda) 2014-05-14 16:24:37.864-0500

Attaching debug log. I bet it worth nothing since there're no debug output in cdr_adaptive_odbc module. There are 87 online sip peers, and they produce a lot of debug messages not related to this issue...

As soon as my agreement is accepted I will attach a small patch which solves this problem for me.

By: Rusty Newton (rnewton) 2014-06-06 08:35:19.209-0500

Grigoriy, I see that you have a valid license agreement. You can go ahead and attach the patch (if you tried already, then you need to re-attach).

By: Matt Jordan (mjordan) 2014-06-06 08:41:08.942-0500

Your description about the timestamp column doesn't make much sense to me. I do see the WARNING you mentioned in your logfile:

{noformat}
[May 15 01:04:28] WARNING[7181][C-0000153d] cdr_adaptive_odbc.c: CDR variable callanswer is not a valid timestamp ('2321201').
{noformat}

But without knowing the schema for your database or your configuration, I'm not sure what would lead to that. Can you provide both?

By: Rusty Newton (rnewton) 2014-06-25 08:54:33.962-0500

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines


When you are able to attach the patch and provide the requested information feel free to contact a bug marshal in #asterisk-bugs or #asterisk-dev (on irc.freenode.net) and ask for the issue to be re-opened.