summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-10-19 15:49:41 -0700
committerMark Wells <mark@freeside.biz>2016-10-19 15:49:58 -0700
commitf4b27b54c3d5664045996dfeb3ff1c4ed474f8c0 (patch)
tree83fb8dca532d4dd79891ce9b0ab0714931f92ba7
parent392d4b113894af4ff051e3363d8b3c78c2d223dc (diff)
in CallPlus CDR import, mark international calls as international, #72264
-rw-r--r--FS/FS/cdr/callplus.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/FS/FS/cdr/callplus.pm b/FS/FS/cdr/callplus.pm
index fa6c799ad..1fcfa6335 100644
--- a/FS/FS/cdr/callplus.pm
+++ b/FS/FS/cdr/callplus.pm
@@ -51,7 +51,14 @@ use Time::Local 'timelocal';
$value =~ s/^\$//;
$cdr->upstream_price($value);
},
- skip(4), # Smartcode, Smartcode Description, Type, SubType
+ skip(2), # Smartcode, Smartcode Description
+ sub { # Type. "I" = international, which matters.
+ my ($cdr, $value) = @_;
+ if ($value eq 'I') {
+ $cdr->set('dst', '+' . $cdr->dst);
+ } # else leave it alone
+ },
+ '', # SubType
],
);