From b92ac439205c878ab88510a18e1336d34ec7d8e8 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 12 May 2015 17:04:48 -0700 Subject: [PATCH] PBXware CDRs: strip trailing non-numeric stuff from src/dst numbers, #34575 --- FS/FS/part_export/pbxware.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FS/FS/part_export/pbxware.pm b/FS/FS/part_export/pbxware.pm index 3da4c2ad1..36b1a2a82 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; -- 2.11.0