import torrus 1.0.9
[freeside.git] / FS / FS / cdr / transnexus.pm
1 package FS::cdr::transnexus;
2
3 use strict;
4 use base qw( FS::cdr );
5 use vars qw( %info );
6 use MIME::Base64;
7 use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
8
9 %info = (
10   'name'          => 'Transnexus',
11   'weight'        => 18,
12   'type'          => 'csv',
13   'sep_char'      => "\t",
14
15   #listref of what to do with each field from the CDR, in order
16   'import_fields' => [
17
18     _cdr_date_parser_maker('startddate'),        #O_CallStartTime
19     'src',            #CallingNumberReported
20     'dst',            #CalledNumberReported
21     'channel',        #SourceDeviceName      / O_ReportingDeviceName
22     'dstchannel',     #O_ReportingDeviceName / DestinationDeviceName
23     sub { $_[0]->clid( decode_base64($_[1]) ); }, #CallId
24     'uniqueid',       #TransactionId
25     'duration',       #RatedDuration
26     'billsec',        #O_BillingDuration
27     'upstream_price', #O_BillingAmountCustCurr
28   ],
29 );
30
31 1;
32
33 __END__
34
35 O_CallStartTime - Date and time stamp of the call setup as reported in the CDR from the source device.
36
37 CallingNumberReported - Calling number from the source device reported in authorization request to the OSPrey server.
38
39 CalledNumberReported - Called number from the source device reported in authorization request to the OSPrey server.
40
41 ----
42 1.1.1 Customer CDR Archive File
43
44 SourceDeviceName - The IP address or Domain Name of the device which is the call source.
45
46 O_ReportingDeviceName - IP address or Domain Name of the source (Originating) device reporting the CDR to the OSPrey Server. If a proxy is used, (such as SIP proxy for signaling or FreeRADIUS for CDR reporting) this field is the IP address of the proxy device, not the actual source device.
47
48 ---
49 or 1.1.2 Provider CDR Archive File
50
51 O_ReportingDeviceName - IP address or Domain Name of the source (Originating) device reporting the CDR to the OSPrey Server. If a proxy is used, (such as SIP proxy for signaling or FreeRADIUS for CDR reporting) this field is the IP address of the proxy device, not the actual source device.  
52
53 DestinationDeviceName - The IP address or Domain Name of the destination device.
54
55 ----
56
57 CallId - The Call Identifier generated by the source VoIP device.
58
59 TransactionId - The unique Transaction Identification number created by the OSPrey server for each call
60
61 RatedDuration - The rateable duration calculated by NexOSS.
62
63 O_BillingDuration - The duration used to calculate the billable amount for a call from the source (Originating) network. This value is derived from RatedDuration and rounded up based on the ¿First Increment¿ or ¿Next Increment¿ rules defined in the Product or Customer Rate Plan used to rate the call.
64
65 O_BillingAmountCustCurr - Amount billable to the source (Originating) Customer. Provided in the currency of the Product or Customer Rate Plan.  
66