From 2b03d1a4a05903c6527164489ec4aaf14ca6c12b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 27 Jul 2011 16:07:21 +0000 Subject: [PATCH] According to Andi, this part also needs to be excluded for unrated CDRs --- cdr-exporter.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cdr-exporter.pl b/cdr-exporter.pl index ce7eadc..5d522e5 100755 --- a/cdr-exporter.pl +++ b/cdr-exporter.pl @@ -132,12 +132,15 @@ my @CDR_BODY_FIELDS = qw(id update_time source_user_id source_provider_id source my @F; while (my $r = $s->fetchrow_hashref()) { # finish export to give rate-o-mat time to catch up - last if $r->{rating_status} eq 'unrated' && $EXPORT_UNRATED !~ /y|1|true/i; - - unless(defined $r->{carrier_zone}) { # platform internal, no peering cost calculated - $r->{carrier_cost} = '0.00'; - $r->{carrier_zone} = 'onnet'; - $r->{carrier_destination} = 'platform internal'; + if ($r->{rating_status} eq 'unrated') { + last if $EXPORT_UNRATED !~ /y|1|true/i; + } + else { + unless(defined $r->{carrier_zone}) { # platform internal, no peering cost calculated + $r->{carrier_cost} = '0.00'; + $r->{carrier_zone} = 'onnet'; + $r->{carrier_destination} = 'platform internal'; + } } $MARKS{lastid} = $r->{id};