1 package FS::cdr::qwest;
4 use vars qw(@ISA %info);
5 use FS::cdr qw(_cdr_date_parser_maker);
10 0 => 'ANSWERED', #normal completed call
11 1 => 'ANSWERED', #"treated call"
12 2 => 'NO ANSWER', #abandoned call
13 3 => 'ERROR', #abnormal call
14 4 => 'ERROR', #signaling system error
15 5 => 'ANSWERED', #forced disconnect
16 6 => 'ANSWERED', #off-net route advance
17 7 => 'NO ANSWER', #test call
18 8 => 'NO ANSWER', #recorded promotion
19 9 => 'ERROR', #TCAP DCP response time-out
20 12=> 'ANSWERED', #abnormal release
21 13=> 'ERROR', #"completed answer CDR"(?)
22 15=> 'ERROR', #"COS failure"(?)
25 my $startdate = _cdr_date_parser_maker('startdate');
26 my $enddate = _cdr_date_parser_maker('enddate');
29 'name' => 'Qwest (Standard Daily)',
31 'type' => 'fixedlength',
32 'fixedlength_format' => [qw(
33 billing_cycle_id:6:1:6
61 orig_bill_file_id:11:222:232
62 orig_trunk_group_name:12:233:244
63 orig_trunk_time_bias_ind:6:245:250
64 term_trunk_group_name:12:251:262
65 final_trunk_group_name:12:263:274
66 orig_trunk_usage_ind:6:275:280
67 orig_pricing_npa:3:281:283
68 orig_pricing_nxx:3:284:286
69 term_pricing_npa:3:287:289
70 term_pricing_nxx:3:290:292
72 component_group_cd:2:299:300
73 component_group_val:24:301:324
74 intra_lata_ind:1:325:325
82 '', # billing_cycle_id
84 # hold onto this, combine it with discn_time later
86 my ($cdr, $data, $conf, $param) = @_;
87 $param->{'discn_dt'} = $data;
95 my ($cdr, $data, $conf, $param) = @_;
96 $param->{'orig_time'} = $data;
100 my ($cdr, $data, $conf, $param) = @_;
101 $data = $param->{'discn_dt'} . $data; #YYYYMMDDhhmmss
102 $enddate->($cdr, $data);
105 'src', # ani (originating number)
110 my ($cdr, $data) = @_;
111 my $compcode = sprintf('%d', $data);
112 $cdr->disposition($disposition{$compcode});
113 # only those that map to ANSWERED are billable, but that should be
114 # set in rating options, not enforced here
118 '', # calledno (physical terminating number)
119 '', # predig (0/1/011 prefix)
122 # backward from the discn_ fields
123 my ($cdr, $data, $conf, $param) = @_;
124 $data .= $param->{'orig_time'};
125 $startdate->($cdr, $data);
130 'channel', # origgrp (orig. trunk group)
131 '', # origmem (belongs in channel?)
132 'dstchannel', # termgrp (term. trunk group)
133 '', # termmem (same?)
135 'charged_party', # billnum (empty for "normal" calls)
136 'accountcode', # acctcd
138 '', # orig_bill_file_id
139 '', # orig_trunk_group_name
140 '', # orig_trunk_time_bias_ind
141 '', # term_trunk_group_name
142 '', # final_trunk_group_name
143 '', # orig_trunk_usage_ind
144 '', # orig_pricing_npa
145 '', # orig_pricing_nxx
146 '', # term_pricing_npa
147 '', # term_pricing_nxx
149 '', # component_group_cd
150 '', # component_group_val
151 '', # intra_lata_ind (or should we use this?)