summaryrefslogtreecommitdiff
path: root/FS/FS/cdr/telos_xml.pm
diff options
context:
space:
mode:
authormark <mark>2011-02-18 00:47:02 +0000
committermark <mark>2011-02-18 00:47:02 +0000
commit5cb4d011200281328b15ca3e0878c7ecd6f5d0e2 (patch)
tree0ca535d6d016a811fd637f83efbaa62a2280fc6b /FS/FS/cdr/telos_xml.pm
parent41e39d7f1cef01b44d1d61af917efc019c3ce967 (diff)
Telos XML SMS records, RT#10721
Diffstat (limited to 'FS/FS/cdr/telos_xml.pm')
-rw-r--r--FS/FS/cdr/telos_xml.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/cdr/telos_xml.pm b/FS/FS/cdr/telos_xml.pm
index a144f0b..8c82b7a 100644
--- a/FS/FS/cdr/telos_xml.pm
+++ b/FS/FS/cdr/telos_xml.pm
@@ -13,6 +13,7 @@ use FS::cdr qw(_cdr_date_parser_maker);
'xml_format' => {
'xmlrow' => [ 'Telos_CDRS', 'CDRecord' ],
'xmlkeys' => [ qw(
+ record_type
seq_num
a_party_num
b_party_num
@@ -23,6 +24,12 @@ use FS::cdr qw(_cdr_date_parser_maker);
},
'import_fields' => [
+ sub { my($cdr, $data, $conf, $param) = @_;
+ $cdr->cdrtypenum($data);
+ # CDR type 2 = SMS records, set billsec = 1 so that
+ # they'll be charged under per-call rating
+ $cdr->billsec(1) if ( $data == 2 );
+ },
'uniqueid',
'src',
'dst', # usually empty for some reason