asterisk2billing.org
http://forum.asterisk2billing.org/

cdr report shows erratic destinations
http://forum.asterisk2billing.org/viewtopic.php?f=22&t=5061
Page 1 of 1

Author:  rampa [ Mon Mar 30, 2009 2:46 am ]
Post subject:  cdr report shows erratic destinations

since some trunk versions, cdr report is showing incorrect destinations

sometimes shows a different destination (eg calling spain mobile shows brazil mobile) other times shows a number. (dialing 13052XXXX shows 55253)

Author:  stavros [ Mon Mar 30, 2009 2:53 pm ]
Post subject: 

Are these new CDRs written by v1.4, or were they upgraded from a v1.3 installation?

Author:  rampa [ Mon Mar 30, 2009 3:23 pm ]
Post subject: 

upgraded to 1.4 in november.

the CDR ws all fine until two weeks ago.

Author:  stavros [ Mon Mar 30, 2009 3:33 pm ]
Post subject: 

OK, so what changed two weeks ago?
Did you upgrade A2B? Or anything else on your system? What configuration changes did you make at the time the CDRs ceased to work.

If you haven't tried the version of A2B in trunk today, you should upgrade and re-test.

Please always mention which svn revision you are working with when reporting a problem with an unreleased version.

Author:  rampa [ Mon Mar 30, 2009 4:20 pm ]
Post subject: 

only upgraded a2b...


upgraded every day. and since two weeks cdr are bad displaying.

just made a svn up and things are still the same.

after every update, i look in the mysql script and apply the mysql updates by hand.

may be i missed one? can anybody post the cc_call structure to see if it differs?

Author:  stavros [ Mon Mar 30, 2009 4:21 pm ]
Post subject: 

Look in the Database folder; you already have it.

Author:  rampa [ Mon Mar 30, 2009 6:24 pm ]
Post subject:  fixed

yes, i have the UPDATE-....sql with the initial table and all the updates. i am asking for the final table to see if it differs. (may be i forgot an option)

Added after 1 minutes:

opss.. sorry. i have also the schema....

Added after 15 minutes:



tables are identical in the schema and in my DB. (both cc_call and cc_prefix)

in the cc_call the prefixes are fine

in the trac i have found a similar ticket (http://www.asterisk2billing.org/cgi-bin ... ticket/421)

seems the same problem.

Added after 49 minutes:

mmm. just wrote an small php script to make a csv from the call report and is reading fine the tables.

is there any qick way to debug the sql query in the cdr report?

Added after 10 minutes:


just checked.

The oproblem shows in the admin UI and in the agent UI, but the destinations are correct in the customer UI.

Added after 41 minutes:

fixed now.
the t1.id_ratecard should be t1.destination



--- call-log-customers.php (revisi�n: 1788)
+++ call-log-customers.php (copia de trabajo)
@@ -96,7 +96,7 @@
}

// This Variable store the argument for the SQL query
-$FG_COL_QUERY = 't1.starttime, t1.src, t1.dnid ,t1.calledstation,t1.id_ratecard, t4.buyrate ,t4.rateinitial ,t1.sessiontime, t1.card_id, t3.trunkcode, t1.terminatecauseid, t1.sipiax, t1.buycost, t1.sessionbill, case when t1.sessionbill!=0 then ((t1.sessionbill-t1.buycost)/t1.sessionbill)*100 else NULL end as margin,case when t1.buycost!=0 then ((t1.sessionbill-t1.buycost)/t1.buycost)*100 else NULL end as markup';
+$FG_COL_QUERY = 't1.starttime, t1.src, t1.dnid ,t1.calledstation,t1.destination, t4.buyrate ,t4.rateinitial ,t1.sessiontime, t1.card_id, t3.trunkcode, t1.terminatecauseid, t1.sipiax, t1.buycost, t1.sessionbill, case when t1.sessionbill!=0 then ((t1.sessionbill-t1.buycost)/t1.sessionbill)*100 else NULL end as margin,case when t1.buycost!=0 then ((t1.sessionbill-t1.buycost)/t1.buycost)*100 else NULL end as markup';
if (LINK_AUDIO_FILE) {
$FG_COL_QUERY .= ', t1.uniqueid';

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/