[freeside-commits] branch FREESIDE_3_BRANCH updated. c57b1c37752141c6c1ab4e96382f03e8a2c9f9a0
Ivan Kohler
ivan at freeside.biz
Mon May 23 14:43:46 PDT 2022
The branch, FREESIDE_3_BRANCH has been updated
via c57b1c37752141c6c1ab4e96382f03e8a2c9f9a0 (commit)
from 627a78fce919b543df70ca06fb910bfe0b3a1f12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c57b1c37752141c6c1ab4e96382f03e8a2c9f9a0
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon May 23 14:43:45 2022 -0700
obey otherPartyNamePresentationIndicator and deal with broadsoft's awful non-standard quoting, RT#86028, RT#81941
diff --git a/FS/FS/cdr/broadsoft.pm b/FS/FS/cdr/broadsoft.pm
index d9530bb13..01755a8bf 100644
--- a/FS/FS/cdr/broadsoft.pm
+++ b/FS/FS/cdr/broadsoft.pm
@@ -23,6 +23,15 @@ use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
sep_char => ',',
disabled => 0,
+ row_callback => sub {
+ my $line = shift;
+ #try to deal with broadsoft's awful non-standard CSV escaping :/
+ $line =~ s/\\,/ /g; # \, becomes just a space... not entirely accurate,
+ # but better than skewing data into the wrong fields
+ $line =~ s/\\\\/\\/g; # undo double backslashes? none in my test data
+ $line;
+ },
+
import_fields => [
# 1: recordId
@@ -119,7 +128,13 @@ use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
#122: otherPartyName
'clid',
- skip(23), #123-145 inclusive
+ #123: otherPartyNamePresentationIndicator
+ sub {
+ my( $cdr, $data ) = @_;
+ $cdr->clid( $data ) unless $data =~ /^Public$/i;
+ },
+
+ skip(22), #124-145 inclusive
# 146: chargedNumber
'charged_party',
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cdr/broadsoft.pm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list