[freeside-commits] freeside/FS/FS/cdr cia.pm, NONE, 1.1 infinite.pm, NONE, 1.1

Mark Wells mark at wavetail.420.am
Wed Sep 22 12:35:20 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS/cdr
In directory wavetail.420.am:/tmp/cvs-serv20213/FS/FS/cdr

Added Files:
	cia.pm infinite.pm 
Log Message:
CIA and Infinite Conferencing cdr formats, RT#8788

--- NEW FILE: infinite.pm ---
package FS::cdr::infinite;

use strict;
use vars qw( @ISA %info );
use FS::cdr qw(_cdr_date_parser_maker);

@ISA = qw(FS::cdr);

%info = (
  'name'          => 'Infinite Conferencing',
  'weight'        => 520,
  'header'        => 1,
  'type'          => 'csv',
  'sep_char'      => ',',
  'import_fields' => [
    'uniqueid',       # billid
    skip(3),          # confid, invoicenum, acctgrpid
    'accountcode',    # accountid ("Room Confirmation Number")
    skip(2),          # billingcode ("Room Billingcode"), confname
    skip(1),          # participant_type
    'startdate',      # starttime_t
    skip(2),          # startdate, starttime
    sub { my($cdr, $data, $conf, $param) = @_;
          $cdr->duration($data * 60);
          $cdr->billsec( $data * 60);
    },                # minutes
    'dst',            # dnis
    'src',            # ani
    skip(8),          # calltype, calltype_text, confstart_t, confstartdate,
                      # confstarttime, confminutes, conflegs, ppm
    'upstream_price', # callcost
    skip(13),         # confcost, rppm, rcallcost, rconfcost,
                      # auxdata[1..4], ldval, sysname, username, cec, pec
    'userfield',      # unnamed field
    ],

);

sub skip { map {''} (1..$_[0]) }

1;

--- NEW FILE: cia.pm ---
package FS::cdr::cia;

use strict;
use vars qw( @ISA %info );
use FS::cdr qw(_cdr_date_parser_maker);

@ISA = qw(FS::cdr);

%info = (
  'name'          => 'Client Instant Access',
  'weight'        => 510,
  'header'        => 1,
  'type'          => 'csv',
  'sep_char'      => "\t",
  'import_fields' => [
    skip(2),          # Reseller Account Number, Confirmation Number
    'description',    # Conference Name
    skip(3),          # Organization Name, Bill Code, Q&A Active 
    'userfield',      # Chairperson Name
    skip(2),          # Conference Start Time, Conference End Time
    _cdr_date_parser_maker('startdate'),  # Connect Time
    _cdr_date_parser_maker('enddate'),    # Disconnect Time
    sub { my($cdr, $data, $conf, $param) = @_;
          $cdr->duration($data);
          $cdr->billsec( $data);
    },                # Duration
    skip(2),          # Roundup Duration, User Name
    'dst',            # DNIS
    'src',            # ANI
    skip(2),          # Call Type, Toll Free, 
    skip(1),          # Chair Conference Entry Code
    'accountcode',    # Participant Conference Entry Code,
    ],

);

sub skip { map {''} (1..$_[0]) }

1;



More information about the freeside-commits mailing list