[freeside-commits] branch master updated. f2e9af8087362231b37e878ed3ef06cf6bbe3fd3
Jeremy Davis
jeremyd at 420.am
Tue May 13 11:38:49 PDT 2014
The branch, master has been updated
via f2e9af8087362231b37e878ed3ef06cf6bbe3fd3 (commit)
from 2a04f28fa2427e9d61f54fe631d0e455cf9945ac (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 f2e9af8087362231b37e878ed3ef06cf6bbe3fd3
Author: Jeremy Davis <jeremyd at freeside.biz>
Date: Tue May 13 11:22:40 2014 -0400
29049 Zintel CDR format
diff --git a/FS/FS/cdr/zintel.pm b/FS/FS/cdr/zintel.pm
new file mode 100644
index 0000000..0e44844
--- /dev/null
+++ b/FS/FS/cdr/zintel.pm
@@ -0,0 +1,45 @@
+package FS::cdr::zintel;
+
+use strict;
+use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
+use Time::Local;
+use FS::cdr qw(_cdr_date_parser_maker);
+
+ at ISA = qw(FS::cdr);
+
+%info = (
+ 'name' => 'Zintel',
+ 'weight' => 123,
+ 'header' => 1,
+ 'import_fields' => [
+
+ 'accountcode', #customer
+ 'src', #anumber
+ 'dst', #bnumber
+ sub { # OriginatingDate and OriginatingTime, two fields in the spec
+ my ($cdr, $date) = @_;
+ $date =~ /^(\d{2})\/(\d{2})\/(\d{4})\s*(\d{2}):(\d{2}):(\d{2})$/
+ or die "unparseable date: $date";
+ my $tmp_date = "$2/$1/$3 $4:$5:$6";
+ $cdr->calldate($tmp_date);
+ },#datetime
+
+ 'billsec', #duration
+ skip(3), #calltype
+ #status
+ #product
+ 'upstream_price',#sellprice
+ skip(1), #fromregion
+ 'upstream_src_regionname', #fromarea
+ skip(2), #fromc2city
+ #toregion
+ 'upstream_dst_regionname', #toarea
+ skip(2), #toc2city
+ #group_label
+ ],
+);
+
+sub skip { map {''} (1..$_[0]) }
+
+1;
+
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cdr/zintel.pm | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 45 insertions(+), 0 deletions(-)
create mode 100644 FS/FS/cdr/zintel.pm
More information about the freeside-commits
mailing list