298625bf410a7033f7b0c74a1cff83f0b47bdc18
[freeside.git] / FS / FS / cdr / genband.pm
1 package FS::cdr::genband;
2
3 use strict;
4 use vars qw(@ISA %info);
5 use FS::cdr qw(_cdr_date_parser_maker);
6
7 @ISA = qw(FS::cdr);
8
9 %info = (
10   'name'          => 'GenBand (Tekelec)', #'Genband G6 (Tekelec T6000)',
11   'weight'        => 140,
12   'type'          => 'fixedlength',
13   'fixedlength_format' => [qw(
14     Type:2:1:2
15     Sequence:4:3:6
16     OIDCall:30:7:36
17     StartTime:19:37:55
18     AnswerTime:19:56:74
19     EndTime:19:75:93
20     SourceName:30:94:123
21     SourceEndName:30:124:153
22     SourceCallerID:20:154:173
23     SourceCallerName:30:174:203
24     DestinationName:30:204:233
25     DestinationEndName:30:234:263
26     DestCallerID:20:264:283
27     DestCallerIDInfo:30:284:313
28     DialedDigits:30:314:343
29     Billing:30:344:373
30     AuthCode:30:374:403
31     CallDirection:1:404:404
32     ExtendedCall:1:405:405
33     ExternalCall:1:406:406
34     Duration:9:407:415
35     SIPCallID:64:416:479
36     IncomingDigits:30:480:509
37     OutpulsedDigits:30:510:539
38     CarrierIdentificationCode:4:540:543
39     CompletionReason:4:544:547
40     OriginationPartition:30:548:577
41     DestinationPartition:30:578:607
42     BilledSourceDID:20:608:628
43     VideoCall:1:629:630
44   )],
45   'import_fields' => [
46     sub {}, #Type:2:1:2
47     sub {}, #Sequence:4:3:6
48     'uniqueid', #OIDCall:30:7:36
49     _cdr_date_parser_maker('startdate'), #StartTime:19:37:55
50     _cdr_date_parser_maker('answerdate'), #AnswerTime:19:56:74
51     _cdr_date_parser_maker('enddate'), #EndTime:19:75:93
52     #SourceName:30:94:123
53     'channel', #SourceEndName:30:124:153
54     'src', #SourceCallerID:20:154:173
55     'clid', #SourceCallerName:30:174:203
56     #DestinationName:30:204:233
57     'dstchannel', #DestinationEndName:30:234:263
58     'dst', #DestCallerID:20:264:283
59     #DestCallerIDInfo:30:284:313
60     #DialedDigits:30:314:343
61     #Billing:30:344:373
62     #AuthCode:30:374:403
63     #CallDirection:1:404:404
64     #ExtendedCall:1:405:405
65     #ExternalCall:1:406:406
66     'duration', #Duration:9:407:415
67     #SIPCallID:64:416:479
68     #IncomingDigits:30:480:509
69     #OutpulsedDigits:30:510:539
70     #CarrierIdentificationCode:4:540:543
71     #CompletionReason:4:544:547
72     #OriginationPartition:30:548:577
73     #DestinationPartition:30:578:607
74     #BilledSourceDID:20:608:628
75     #VideoCall:1:629:630
76   ],
77 );
78 #      acctid - primary key
79 #       calldate - Call timestamp (SQL timestamp)
80 #              clid - Caller*ID with text
81 #              src - Caller*ID number / Source number
82 #              dst - Destination extension
83 #       dcontext - Destination context
84 #              channel - Channel used
85 #              dstchannel - Destination channel if appropriate
86 #       lastapp - Last application if appropriate
87 #       lastdata - Last application data
88 #              startdate - Start of call (UNIX-style integer timestamp)
89 #              answerdate - Answer time of call (UNIX-style integer timestamp)
90 #              enddate - End time of call (UNIX-style integer timestamp)
91 #              duration - Total time in system, in seconds
92 #       billsec - Total time call is up, in seconds
93 #       disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
94 #       amaflags - What flags to use: BILL, IGNORE etc, specified on a per
95 #       channel basis like accountcode.
96 #       accountcode - CDR account number to use: account
97 #              uniqueid - Unique channel identifier (Unitel/RSLCOM Event ID)
98 #       userfield - CDR user-defined field
99 #       cdr_type - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
100 #       charged_party - Service number to be billed
101 #       upstream_currency - Wholesale currency from upstream
102 #       upstream_price - Wholesale price from upstream
103 #       upstream_rateplanid - Upstream rate plan ID
104 #       rated_price - Rated (or re-rated) price
105 #       distance - km (need units field?)
106 #       islocal - Local - 1, Non Local = 0
107 #       calltypenum - Type of call - see FS::cdr_calltype
108 #       description - Description (cdr_type 7&8 only) (used for
109 #       cust_bill_pkg.itemdesc)
110 #       quantity - Number of items (cdr_type 7&8 only)
111 #       carrierid - Upstream Carrier ID (see FS::cdr_carrier)
112 #       upstream_rateid - Upstream Rate ID
113 #       svcnum - Link to customer service (see FS::cust_svc)
114 #       freesidestatus - NULL, done (or something)
115
116 1;