From: ivan Date: Sat, 30 May 2009 10:45:43 +0000 (+0000) Subject: add transnexus format, RT#5229 X-Git-Tag: root_of_svc_elec_features~1158 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a0b2c1a1ac9da3b33bc088dab0af77f6555428f7 add transnexus format, RT#5229 --- diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 421fd2bb8..ab87a6893 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -710,7 +710,7 @@ sub _cdr_date_parse { #$date =~ /^\s*(\d{4})[\-\/]\(\d{1,2})[\-\/](\d{1,2})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})\s*$/ #taqua #2007-10-31 08:57:24.113000000 - if ( $date =~ /^\s*(\d{4})\D(\d{1,2})\D(\d{1,2})\s+(\d{1,2})\D(\d{1,2})\D(\d{1,2})(\D|$)/ ) { + if ( $date =~ /^\s*(\d{4})\D(\d{1,2})\D(\d{1,2})\D+(\d{1,2})\D(\d{1,2})\D(\d{1,2})(\D|$)/ ) { ($year, $mon, $day, $hour, $min, $sec) = ( $1, $2, $3, $4, $5, $6 ); } elsif ( $date =~ /^\s*(\d{1,2})\D(\d{1,2})\D(\d{4})\s+(\d{1,2})\D(\d{1,2})\D(\d{1,2})(\D|$)/ ) { ($mon, $day, $year, $hour, $min, $sec) = ( $1, $2, $3, $4, $5, $6 ); diff --git a/FS/FS/cdr/transnexus.pm b/FS/FS/cdr/transnexus.pm new file mode 100644 index 000000000..573a8b16d --- /dev/null +++ b/FS/FS/cdr/transnexus.pm @@ -0,0 +1,65 @@ +package FS::cdr::transnexus; + +use strict; +use base qw( FS::cdr ); +use vars qw( %info ); +use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker ); + +%info = ( + 'name' => 'Transnexus', + 'weight' => 18, + 'type' => 'csv', + 'sep_char' => "\t", + + #listref of what to do with each field from the CDR, in order + 'import_fields' => [ + + _cdr_date_parser_maker('startddate'), #O_CallStartTime + 'src', #CallingNumberReported + 'dst', #CalledNumberReported + 'channel', #SourceDeviceName / O_ReportingDeviceName + 'dstchannel', #O_ReportingDeviceName / DestinationDeviceName + 'clid', #CallId + 'uniqueid', #TransactionId + 'duration', #RatedDuration + 'billsec', #O_BillingDuration + 'upstream_price', #O_BillingAmountCustCurr + ], +); + +1; + +__END__ + +O_CallStartTime - Date and time stamp of the call setup as reported in the CDR from the source device. + +CallingNumberReported - Calling number from the source device reported in authorization request to the OSPrey server. + +CalledNumberReported - Called number from the source device reported in authorization request to the OSPrey server. + +---- +1.1.1 Customer CDR Archive File + +SourceDeviceName - The IP address or Domain Name of the device which is the call source. + +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. + +--- +or 1.1.2 Provider CDR Archive File + +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. + +DestinationDeviceName - The IP address or Domain Name of the destination device. + +---- + +CallId - The Call Identifier generated by the source VoIP device. + +TransactionId - The unique Transaction Identification number created by the OSPrey server for each call + +RatedDuration - The rateable duration calculated by NexOSS. + +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. + +O_BillingAmountCustCurr - Amount billable to the source (Originating) Customer. Provided in the currency of the Product or Customer Rate Plan. +