The example below is for finding calls with a rated duration greater than 5 hours.
SQL> set pagesize 1000 SQL> select O_CALLSTARTTIME, RATEDDURATION, CALLID, transactionid, O_WORKFILENAME, CALLEDNUMBERAFTERROUTING, O_CALLENDTIME from RatedCDR where RatedDuration > 18000;
In order to remove long duration calls from the database, follow one of the examples below before regenerating the invoice.
SQL> delete from RatedCDR where CallId = 'Nzk2MzUzMzEyMEAxNzMuNjguMTQ2LjE1MA=='; 1 row deleted SQL> commit;
SQL> delete from RatedCDR where TransactionId = '5729876167990449985'; 1 row deleted SQL> commit;
The query above also gives you the TransactionId, which can be used to grep through the CDRs in the ARCHIVE directory.
[ossadmin@nexoss ARCHIVE]$ zgrep Nzk2MzUzMzEyMEAxNzMuNjguMTQ2LjE1MA== *-cdr_2012_0*