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';