From 39bc0dfc63665c6e1d5c691349bc2f0b74b813ce Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 21 Aug 2015 09:21:12 -0400 Subject: [PATCH] MT#14485 avoid duplicate CDRs for in/out within the same reseller Change-Id: Ie4c56fab85bbc5f4ca4f5e9869e456f6560b3413 --- cdr-exporter.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cdr-exporter.pl b/cdr-exporter.pl index ed4b7bb..12062f0 100755 --- a/cdr-exporter.pl +++ b/cdr-exporter.pl @@ -78,7 +78,11 @@ sub callback { if(confval('EXPORT_INCOMING') eq "no" && $src_provid ne $dst_provid) { # don't store incoming call to this reseller } else { - write_reseller_id($dst_provid, $reseller_line); + if ($src_uuid ne '0' && $src_provid eq $dst_provid) { + # skip duplicate entries + } else { + write_reseller_id($dst_provid, $reseller_line); + } } } }