- #astricon hack? config option?
- push @cdrs,
- qsearch( {
- 'table' => 'cdr',
- 'hashref' => { 'freesidestatus' => '',
- 'src' => $number,
- },
- 'extra_sql' => 'FOR UPDATE',
- } );
-
- if ( length($default_prefix) ) {
- push @cdrs,
- qsearch( {
- 'table' => 'cdr',
- 'hashref' => { 'freesidestatus' => '',
- 'src' => "$default_prefix$number",
- },
- 'extra_sql' => 'FOR UPDATE',
- } );
+ my @where = ( ' ( '. join(' OR ', @orwhere ). ' ) ' );
+
+ if ( $options{'begin'} ) {
+ push @where, 'startdate >= '. $options{'begin'};
+ }
+ if ( $options{'end'} ) {
+ push @where, 'startdate < '. $options{'end'};