1 package FS::cdr::troop2;
4 use base qw( FS::cdr );
5 use vars qw( %info $tmp_date $tmp_src_city $tmp_dst_city );
8 ##use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
18 'userfield', #account_num (userfield?)
21 sub { my($cdr, $date) = @_;
22 #is this an excel date? or just text?
27 sub { my($cdr, $time) = @_;
28 #is this an excel time? or just text?
29 $cdr->startdate( str2time("$tmp_date $time") );
36 sub { my($cdr, $duration) = @_;
37 $cdr->duration($duration);
38 $cdr->billsec($duration);
41 'clid', #auth_code_ani (clid?)
43 'accountcode', #account_code
46 # OVS Type / Maybe / add "011" to international calls
51 sub { my($cdr, $ovs) = @_;
52 my $pre = ( $ovs =~ /^\s*[OZ]\s*$/i ) ? '011' : '1';
53 $cdr->dst( $pre. $cdr->dst ) unless $cdr->dst =~ /^$pre/;
57 sub { (my $cdr, $tmp_src_city) = @_; },
60 sub { my($cdr, $state) = @_;
61 $cdr->upstream_src_regionname("$tmp_src_city, $state");
65 sub { (my $cdr, $tmp_dst_city) = @_; },
68 sub { my($cdr, $state) = @_;
69 $cdr->upstream_dst_regionname("$tmp_dst_city, $state");
73 '', #CANADA / UNITED STATES / BELL. huh. country or terminating provider?
75 '', #cc_ind (what's this?)
77 'upstream_price', #call_charge
83 #additional upstream pricing details we don't need?