summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-05-12 17:04:48 -0700
committerMark Wells <mark@freeside.biz>2015-05-12 17:04:48 -0700
commitb92ac439205c878ab88510a18e1336d34ec7d8e8 (patch)
tree0c0f01c6e7be6a6c498c6e804a72cdcfdb6c9ca5 /FS
parent191a9fb439b8ed15fdcd458dd51f5890dbf60f29 (diff)
PBXware CDRs: strip trailing non-numeric stuff from src/dst numbers, #34575
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/pbxware.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/FS/FS/part_export/pbxware.pm b/FS/FS/part_export/pbxware.pm
index 3da4c2a..36b1a2a 100644
--- a/FS/FS/part_export/pbxware.pm
+++ b/FS/FS/part_export/pbxware.pm
@@ -140,6 +140,11 @@ sub import_cdrs {
uniqueid => $uniqueid,
);
@hash{@names} = @$row;
+ # strip non-numeric junk that sometimes gets appended to these (it
+ # causes problems creating Freeside detail records)
+ foreach (qw(src dst)) {
+ $hash{$_} =~ s/\D*$//;
+ }
my $cdr = FS::cdr->new(\%hash);
$error = $cdr->insert;