summaryrefslogtreecommitdiff
path: root/FS/FS/cdr
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/cdr')
-rw-r--r--FS/FS/cdr/asterisk.pm45
-rw-r--r--FS/FS/cdr/bell_west.pm122
-rw-r--r--FS/FS/cdr/broadsoft.pm108
-rw-r--r--FS/FS/cdr/cia.pm39
-rw-r--r--FS/FS/cdr/genband.pm120
-rw-r--r--FS/FS/cdr/genband_meetme.pm17
-rw-r--r--FS/FS/cdr/indosoft.pm71
-rw-r--r--FS/FS/cdr/infinite.pm41
-rw-r--r--FS/FS/cdr/netcentrex.pm783
-rw-r--r--FS/FS/cdr/nextone.pm26
-rw-r--r--FS/FS/cdr/openser.pm24
-rw-r--r--FS/FS/cdr/sansay.pm408
-rw-r--r--FS/FS/cdr/simple.pm52
-rw-r--r--FS/FS/cdr/simple2.pm51
-rw-r--r--FS/FS/cdr/taqua.pm190
-rw-r--r--FS/FS/cdr/taqua_om.pm19
-rw-r--r--FS/FS/cdr/telos_csv.pm60
-rw-r--r--FS/FS/cdr/telos_xml.pm36
-rw-r--r--FS/FS/cdr/transnexus.pm66
-rw-r--r--FS/FS/cdr/troop.pm128
-rw-r--r--FS/FS/cdr/unitel.pm39
-rw-r--r--FS/FS/cdr/vitelity.pm25
-rw-r--r--FS/FS/cdr/wip.pm48
23 files changed, 0 insertions, 2518 deletions
diff --git a/FS/FS/cdr/asterisk.pm b/FS/FS/cdr/asterisk.pm
deleted file mode 100644
index 8b29642ea..000000000
--- a/FS/FS/cdr/asterisk.pm
+++ /dev/null
@@ -1,45 +0,0 @@
-package FS::cdr::asterisk;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-#http://www.the-asterisk-book.com/unstable/funktionen-cdr.html
-my %amaflags = (
- DEFAULT => 0,
- OMIT => 1, #asterisk 1.4+
- IGNORE => 1, #asterisk 1.2
- BILLING => 2, #asterisk 1.4+
- BILL => 2, #asterisk 1.2
- DOCUMENTATION => 3,
- #? '' => 0,
-);
-
-%info = (
- 'name' => 'Asterisk',
- 'weight' => 10,
- 'import_fields' => [
- 'accountcode',
- 'src',
- 'dst',
- 'dcontext',
- 'clid',
- 'channel',
- 'dstchannel',
- 'lastapp',
- 'lastdata',
- _cdr_date_parser_maker('startdate'),
- _cdr_date_parser_maker('answerdate'),
- _cdr_date_parser_maker('enddate'),
- 'duration',
- 'billsec',
- 'disposition',
- sub { my($cdr, $amaflags) = @_; $cdr->amaflags($amaflags{$amaflags}); },
- 'uniqueid',
- 'userfield',
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/bell_west.pm b/FS/FS/cdr/bell_west.pm
deleted file mode 100644
index f745bb190..000000000
--- a/FS/FS/cdr/bell_west.pm
+++ /dev/null
@@ -1,122 +0,0 @@
-package FS::cdr::bell_west;
-
-use strict;
-use base qw( FS::cdr );
-use vars qw( %info $tmp_mon $tmp_mday $tmp_year );
-use Time::Local;
-#use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
-
-%info = (
- 'name' => 'Bell West',
- 'weight' => 210,
- 'header' => 1,
- 'type' => 'xls',
-
- 'import_fields' => [
-
- # CDR FIELD / REQUIRED / Notes
-
- # CHG TYPE / No / Internal Code only (no need to import)
- sub {},
-
- # ACCOUNT # / No / Internal Number only (no need to import)
- sub {},
-
- # DATE / Yes / "DATE" Excel date format MM/DD/YYYY
- # XXX false laziness w/troop.pm
- sub { my($cdr, $date) = @_;
-
- my $datetime = DateTime::Format::Excel->parse_datetime( $date );
- $tmp_mon = $datetime->mon_0;
- $tmp_mday = $datetime->mday;
- $tmp_year = $datetime->year;
- },
-
- # CUST NO / Yes / "TIME" "075959" Text based time
- # Note: This is really the start time but Bell header says "Cust No" which
- # is wrong
- sub { my($cdr, $time) = @_;
- #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
- $time =~ /^(\d{2})(\d{2})(\d{2})$/
- or die "unparsable time: $time"; #maybe we shouldn't die...
- #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
- $cdr->startdate(
- timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year)
- );
- },
-
- # BTN / Yes / Main billing number but not DID or real number
- # (put in SRC field)
- 'src',
-
- # ORIG CITY / No / We will use your Freeside rating and description name
- 'channel',
-
- # TERM / YES / All calls should be billed, however all calls are
- # missing "1+" and "011+" & DIR ASST = "411"
- 'dst',
-
- # TERM CITY / No / We will use your Freeside rating and description name
- 'dstchannel',
-
- # WTN / Yes / Bill to number (put in "charged_party")
- 'charged_party',
-
- # CODE / Yes / Account Code (security) and we need on invoice
- 'accountcode',
-
- # PROV/COUNTRY / No / We will use your Freeside rating and description name
- # (but use this to add "011" for "International" calls)
- sub { my( $cdr, $prov ) = @_;
- my $pre = ( $prov =~ /^\s*International\s*/i ) ? '011' : '1';
- $cdr->dst( $pre. $cdr->dst ) unless $cdr->dst =~ /^$pre/;
- },
-
- # CALL TYPE / Possibly / Not sure if you need this to determine correct
- # billing method ?
- # DDD normal call (Direct Dial Dsomething? ="LD"?)
- # TF Toll Free
- # (toll free dst# should be sufficient to rate)
- # DAT Directory AssisTance
- # (dst# 411 "area code" should be sufficient to rate)
- # DNS (Another sort of directory assistance?... only one record with
- # "8195551212" in the dst#)
- 'dcontext', #probably don't need... map to cdr_type? calltypenum?
-
- # DURATION Yes Units = seconds
- 'billsec', #need to trim .00 ?
-
- # AMOUNT CHARGED No Will use Freeside rating and description name
- sub { my( $cdr, $amount) = @_;
- $amount =~ s/^\$//;
- $cdr->upstream_price( $amount );
- },
-
- ],
-
-);
-
-1;
-
-__END__
-
-CHG TYPE (unused)
-ACCOUNT # (unused)
-
-DATE startdate (+ CUST NO)
-CUST NO (startdate time)
- - Start of call (UNIX-style integer timestamp)
-
-BTN *src - Caller*ID number / Source number
-ORIG CITY channel - Channel used
-TERM # *dst - Destination extension
-TERM CITY dstchannel - Destination channel if appropriate
-WTN *charged_party - Service number to be billed
-CODE *accountcode - CDR account number to use: account
-
-PROV/COUNTRY (used to prefix TERM # w/ 1 or 011)
-
-CALL TYPE dcontext - Destination context
-DURATION *billsec - Total time call is up, in seconds
-AMOUNT CHARGED *upstream_price - Wholesale price from upstream
-
diff --git a/FS/FS/cdr/broadsoft.pm b/FS/FS/cdr/broadsoft.pm
deleted file mode 100644
index 423e96fcc..000000000
--- a/FS/FS/cdr/broadsoft.pm
+++ /dev/null
@@ -1,108 +0,0 @@
-package FS::cdr::broadsoft;
-
-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' => 'Broadsoft',
- 'weight' => 500,
- 'header' => 1, #0 default, set to 1 to ignore the first line, or
- # to higher numbers to ignore that number of lines
- 'type' => 'csv', #csv (default), fixedlength or xls
- 'sep_char' => ',', #for csv, defaults to ,
- 'disabled' => 0, #0 default, set to 1 to disable
-
- #listref of what to do with each field from the CDR, in order
- 'import_fields' => [
-
- skip(2),
- sub { my($cdr, $data, $conf, $param) = @_;
- $param->{skiprow} = 1 if lc($data) ne 'normal';
- '' }, # 3: type
-
- trim('accountcode'), # 4: userNumber
- skip(2),
- trim('src'), # 7: callingNumber
- skip(1),
- trim('dst'), # 9: calledNumber
-
- _cdr_date_parser_maker('startdate'), # 10: startTime
- skip(1),
- sub { my($cdr, $data) = @_;
- $cdr->disposition(
- lc($data) eq 'yes' ?
- 'ANSWERED' : 'NO ANSWER') }, # 12: answerIndicator
- _cdr_date_parser_maker('answerdate'), # 13: answerTime
- _cdr_date_parser_maker('enddate'), # 14: releaseTime
-
- ],
-
-);
-
-sub trim {
- my $fieldname = shift;
- return sub {
- my($cdr, $data) = @_;
- $data =~ s/^\+1//;
- $cdr->$fieldname($data);
- ''
- }
-}
-
-sub skip {
- map { undef } (1..$_[0]);
-}
-
-1;
-
-__END__
-
-list of freeside CDR fields, useful ones marked with *
-
- acctid - primary key
- *[1] calldate - Call timestamp (SQL timestamp)
- clid - Caller*ID with text
-7 * src - Caller*ID number / Source number
-9 * dst - Destination extension
- dcontext - Destination context
- channel - Channel used
- dstchannel - Destination channel if appropriate
- lastapp - Last application if appropriate
- lastdata - Last application data
-10 * startdate - Start of call (UNIX-style integer timestamp)
-13 answerdate - Answer time of call (UNIX-style integer timestamp)
-14 * enddate - End time of call (UNIX-style integer timestamp)
- * duration - Total time in system, in seconds
- * billsec - Total time call is up, in seconds
-12 *[2] disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
- amaflags - What flags to use: BILL, IGNORE etc, specified on a per
- channel basis like accountcode.
-4 *[3] accountcode - CDR account number to use: account
- uniqueid - Unique channel identifier
- userfield - CDR user-defined field
- cdr_type - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
- *[4] charged_party - Service number to be billed
- upstream_currency - Wholesale currency from upstream
- *[5] upstream_price - Wholesale price from upstream
- upstream_rateplanid - Upstream rate plan ID
- rated_price - Rated (or re-rated) price
- distance - km (need units field?)
- islocal - Local - 1, Non Local = 0
- *[6] calltypenum - Type of call - see FS::cdr_calltype
- description - Description (cdr_type 7&8 only) (used for
- cust_bill_pkg.itemdesc)
- quantity - Number of items (cdr_type 7&8 only)
- carrierid - Upstream Carrier ID (see FS::cdr_carrier)
- upstream_rateid - Upstream Rate ID
- svcnum - Link to customer service (see FS::cust_svc)
- freesidestatus - NULL, done (or something)
-
-[1] Auto-populated from startdate if not present
-[2] Package options available to ignore calls without a specific disposition
-[3] When using 'cdr-charged_party-accountcode' config
-[4] Auto-populated from src (normal calls) or dst (toll free calls) if not present
-[5] When using 'upstream_simple' rating method.
-[6] Set to usage class classnum when using pre-rated CDRs and usage class-based
- taxation (local/intrastate/interstate/international)
diff --git a/FS/FS/cdr/cia.pm b/FS/FS/cdr/cia.pm
deleted file mode 100644
index 61343338a..000000000
--- a/FS/FS/cdr/cia.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-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;
diff --git a/FS/FS/cdr/genband.pm b/FS/FS/cdr/genband.pm
deleted file mode 100644
index 619d9085f..000000000
--- a/FS/FS/cdr/genband.pm
+++ /dev/null
@@ -1,120 +0,0 @@
-package FS::cdr::genband;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'GenBand (Tekelec)', #'Genband G6 (Tekelec T6000)',
- 'weight' => 140,
- 'type' => 'fixedlength',
- 'fixedlength_format' => [qw(
- Type:2:1:2
- Sequence:4:3:6
- OIDCall:30:7:36
- StartTime:19:37:55
- AnswerTime:19:56:74
- EndTime:19:75:93
- SourceName:30:94:123
- SourceEndName:30:124:153
- SourceCallerID:20:154:173
- SourceCallerName:30:174:203
- DestinationName:30:204:233
- DestinationEndName:30:234:263
- DestCallerID:20:264:283
- DestCallerIDInfo:30:284:313
- DialedDigits:30:314:343
- Billing:30:344:373
- AuthCode:30:374:403
- CallDirection:1:404:404
- ExtendedCall:1:405:405
- ExternalCall:1:406:406
- Duration:9:407:415
- SIPCallID:64:416:479
- IncomingDigits:30:480:509
- OutpulsedDigits:30:510:539
- CarrierIdentificationCode:4:540:543
- CompletionReason:4:544:547
- OriginationPartition:30:548:577
- DestinationPartition:30:578:607
- BilledSourceDID:20:608:627
- OriginalCall:30:628:657
- VideoCall:1:658:658
- )],
- 'import_fields' => [
- sub {}, #Type:2:1:2
- sub {}, #Sequence:4:3:6
- 'uniqueid', #OIDCall:30:7:36
- _cdr_date_parser_maker('startdate'), #StartTime:19:37:55
- _cdr_date_parser_maker('answerdate'), #AnswerTime:19:56:74
- _cdr_date_parser_maker('enddate'), #EndTime:19:75:93
- sub {}, #SourceName:30:94:123
- 'channel', #SourceEndName:30:124:153
- 'src', #SourceCallerID:20:154:173
- 'clid', #SourceCallerName:30:174:203
- sub {}, #DestinationName:30:204:233
- 'dstchannel', #DestinationEndName:30:234:263
- 'dst', #DestCallerID:20:264:283
- sub {}, #DestCallerIDInfo:30:284:313
- sub {}, #DialedDigits:30:314:343
- sub {}, #Billing:30:344:373
- sub {}, #AuthCode:30:374:403
- sub {}, #CallDirection:1:404:404
- sub {}, #ExtendedCall:1:405:405
- sub {}, #ExternalCall:1:406:406
- sub { my( $cdr, $duration ) = @_;
- $cdr->duration($duration);
- $cdr->billsec($duration); }, #'duration', #Duration:9:407:415
- sub {}, #SIPCallID:64:416:479
- sub {}, #IncomingDigits:30:480:509
- sub {}, #OutpulsedDigits:30:510:539
- sub {}, #CarrierIdentificationCode:4:540:543
- sub {}, #CompletionReason:4:544:547
- sub {}, #OriginationPartition:30:548:577
- sub {}, #DestinationPartition:30:578:607
- sub {}, #BilledSourceDID:20:608:627
- sub {}, #OriginalCall:30:628:657
- sub {}, #VideoCall:1:658:658
- ],
-);
-# acctid - primary key
-# calldate - Call timestamp (SQL timestamp)
-# clid - Caller*ID with text
-# src - Caller*ID number / Source number
-# dst - Destination extension
-# dcontext - Destination context
-# channel - Channel used
-# dstchannel - Destination channel if appropriate
-# lastapp - Last application if appropriate
-# lastdata - Last application data
-# startdate - Start of call (UNIX-style integer timestamp)
-# answerdate - Answer time of call (UNIX-style integer timestamp)
-# enddate - End time of call (UNIX-style integer timestamp)
-# duration - Total time in system, in seconds
-# billsec - Total time call is up, in seconds
-# disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
-# amaflags - What flags to use: BILL, IGNORE etc, specified on a per
-# channel basis like accountcode.
-# accountcode - CDR account number to use: account
-# uniqueid - Unique channel identifier (Unitel/RSLCOM Event ID)
-# userfield - CDR user-defined field
-# cdr_type - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
-# charged_party - Service number to be billed
-# upstream_currency - Wholesale currency from upstream
-# upstream_price - Wholesale price from upstream
-# upstream_rateplanid - Upstream rate plan ID
-# rated_price - Rated (or re-rated) price
-# distance - km (need units field?)
-# islocal - Local - 1, Non Local = 0
-# calltypenum - Type of call - see FS::cdr_calltype
-# description - Description (cdr_type 7&8 only) (used for
-# cust_bill_pkg.itemdesc)
-# quantity - Number of items (cdr_type 7&8 only)
-# carrierid - Upstream Carrier ID (see FS::cdr_carrier)
-# upstream_rateid - Upstream Rate ID
-# svcnum - Link to customer service (see FS::cust_svc)
-# freesidestatus - NULL, done (or something)
-
-1;
diff --git a/FS/FS/cdr/genband_meetme.pm b/FS/FS/cdr/genband_meetme.pm
deleted file mode 100644
index d87dd8fbf..000000000
--- a/FS/FS/cdr/genband_meetme.pm
+++ /dev/null
@@ -1,17 +0,0 @@
-package FS::cdr::genband_meetme;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Genband (Tekelec) Meet-Me Conference', #'Genband G6 (Tekelec T6000) Meet-Me Conference Log Records',
- 'weight' => 145,
- 'disabled' => 1,
- 'import_fields' => [
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/indosoft.pm b/FS/FS/cdr/indosoft.pm
deleted file mode 100644
index cb25089e3..000000000
--- a/FS/FS/cdr/indosoft.pm
+++ /dev/null
@@ -1,71 +0,0 @@
-package FS::cdr::indosoft;
-
-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' => 'Indosoft Conference Bridge',
- 'weight' => 300,
- 'header' => 1,
- 'type' => 'csv',
-
- #listref of what to do with each field from the CDR, in order
- 'import_fields' => [
-
- #cdr_id
- 'uniqueid',
-
- #connect_time
- _cdr_date_parser_maker( ['startdate', 'answerdate' ] ),
-
- #disconnect_time
- _cdr_date_parser_maker('enddate'),
-
- #account_id
- 'accountcode',
-
- #conference_id
- 'userfield',
-
- #client_id
- 'charged_party',
-
- #pin_used
- 'dcontext',
-
- #channel
- 'channel',
-
- #clid
- #'src',
- sub { my($cdr, $clid) = @_;
- $cdr->clid( $clid ); #because they called it 'clid' explicitly
- $cdr->src( $clid );
- },
-
- #dnis
- 'dst',
-
- #call_status
- 'disposition',
-
- #conf_billing_code
- 'lastapp', #arbitrary
-
- #participant_id
- 'lastdata', #arbitrary
-
- #codr_id
- 'dstchannel', #arbitrary
-
- #call_type
- 'description',
-
- ],
-
-);
-
-1;
-
diff --git a/FS/FS/cdr/infinite.pm b/FS/FS/cdr/infinite.pm
deleted file mode 100644
index 90560c8c7..000000000
--- a/FS/FS/cdr/infinite.pm
+++ /dev/null
@@ -1,41 +0,0 @@
-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;
diff --git a/FS/FS/cdr/netcentrex.pm b/FS/FS/cdr/netcentrex.pm
deleted file mode 100644
index a434d5d5f..000000000
--- a/FS/FS/cdr/netcentrex.pm
+++ /dev/null
@@ -1,783 +0,0 @@
-package FS::cdr::netcentrex;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-#close enough http://wiki.freeswitch.org/wiki/Hangup_causes
-#my %disposition = (
-# 16 => 'ANSWERED',
-# 17 => 'BUSY',
-# 18 => 'NO USER RESPONSE',
-# 19 => 'NO ANSWER',
-# 156 => '??' #???
-#);
-
-%info = (
- 'name' => 'NetCentrex',
- 'weight' => 150,
- 'type' => 'csv',
- 'sep_char' => ';',
- 'import_fields' => [
- '', #00 SU Identifier
- '', #01 SU IP Address
- '', #02 Conference ID
- '', #03 Call ID
- '', #04 Leg number (all 0)
- _cdr_date_parser_maker('startdate'), #05 Authorize timestamp
- _cdr_date_parser_maker('answerdate'), #06 Start timestamp
- sub { my( $cdr, $duration ) = @_; #07 Duration
- $cdr->duration($duration);
- $cdr->billsec( $duration);
- },
- _e164_parser_maker('src', 'charged_party'), #08 Caller
- _e164_parser_maker('dcontext', 'dst', 'norewrite_pivotonly'=>1) ,#09 Callee
- 'channel', #10 Source IP
- 'dstchannel', #11 Destination IP
- 'userfield', #12 selector Tag
- '', #13 *service Tag
- '', #14 *announcement Tag
- '', #15 *route Table Tag
- '', #16 vTrunkGroup Tag
- '', #17 vTrunk Tag XXX ? another userfield?
- '', #18 *termination Tag
- '', #19 *location group Tag
- '', #20 *GK Originating IP
- '', #21 *GK Terminating IP
- '', #22 *GK Originating Domain
- '', #23 *GK Terminating Domain
- '', #24 Malicious Call (all 0)
- '', #25 Service (all 0)
- 'disposition', #26 Termination Cause 16/17/18/156
- '', #27 Simulation Call (all 0) supposedly don't bill 1
- '', #28 Type (all C)
- _cdr_date_parser_maker('enddate'), #29 ReleaseTimeStamp
- #seems empty from here in sampes...
- '', #30
- '', #31
- '', #32
- '', #33
- '', #34
- '', #35
- '', #36
- '', #37
- '', #38
- '', #39
- '', #40
- '', #41
- '', #42
- '', #43
- '', #44
- '', #45
- '', #46
- '', #47
- '', #48
- '', #49
- '', #50
-
- # * empty
- ],
-
-);
-
-sub _e164_parser_maker {
- my( $field, $pivot_field, %opt ) = @_;
- return sub {
- my( $cdr, $e164 ) = @_;
- my( $pivot, $number ) = _e164_parse($e164);
- if ( $opt{'norewrite_pivotonly'} && ! $pivot ) {
- $cdr->$pivot_field( $number );
- } else {
- $cdr->$field( $number );
- $cdr->$pivot_field( $pivot );
- }
- };
-}
-
-sub _e164_parse {
- my $e164 = shift;
-
- $e164 =~ s/^e164://;
-
- my ($pivot, $number);
- if ( $e164 =~ /^O(\d+)$/ ) {
- $pivot = ''; #?
- $number = $1;
- } elsif ( $e164 =~ /^000000(\d+)$/ ) {
- $pivot = '';
- $number = $1;
- } elsif ( $e164 =~ /^(1\d{5})(\d+)$/ ) {
- $pivot = $1;
- $number = $2;
- } else {
- $pivot = '';
- $number = $e164; #unparsable...
- }
-
- ( $pivot, $number );
-}
-
-1;
-
-=pod
-
- calldate - Call timestamp (SQL timestamp)
- clid - Caller*ID with text
- src - Caller*ID number / Source number
- dst - Destination extension
- dcontext - Destination context
- channel - Channel used
- dstchannel - Destination channel if appropriate
- lastapp - Last application if appropriate
- lastdata - Last application data
- startdate - Start of call (UNIX-style integer timestamp)
- answerdate - Answer time of call (UNIX-style integer timestamp)
- enddate - End time of call (UNIX-style integer timestamp)
- duration - Total time in system, in seconds
- billsec - Total time call is up, in seconds
- disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
- amaflags - What flags to use: BILL, IGNORE etc, specified on a per
- channel basis like accountcode.
- accountcode - CDR account number to use: account
- uniqueid - Unique channel identifier (Unitel/RSLCOM Event ID)
- userfield - CDR user-defined field
- cdr_type - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
- charged_party - Service number to be billed
- upstream_currency - Wholesale currency from upstream
- upstream_price - Wholesale price from upstream
- upstream_rateplanid - Upstream rate plan ID
- rated_price - Rated (or re-rated) price
- distance - km (need units field?)
- islocal - Local - 1, Non Local = 0
- calltypenum - Type of call - see FS::cdr_calltype
- description - Description (cdr_type 7&8 only) (used for
- cust_bill_pkg.itemdesc)
- quantity - Number of items (cdr_type 7&8 only)
- carrierid - Upstream Carrier ID (see FS::cdr_carrier)
- upstream_rateid - Upstream Rate ID
- svcnum - Link to customer service (see FS::cust_svc)
- freesidestatus - NULL, done (or something)
- cdrbatch
-
-No. Field Type/Length Format / Remarks Description Example
-00 SU Identifier String This field is never empty. SU Identifier (as defined by su- su01
- <= 16 chars core.ini/[SU]/SUInstance key at SU
- 192.168.121.1
- initialization).
- By default, the SUInstance is set to
- a string that represents the SU
- private IP address.
-01 SU IP address String ipv4:xx.xx.xx.xx<:port> SU IP address (and ASM port) as ipv4:213.56.136.29: 2518
- <= 26 chars provided by su-
- This field is never empty.
- crouting.ini/[crRouting]/localASMa
- ddress key.
-02 Conference ID String When [CDR_FIELDS] Unique call session identifier Advised format
- <= 64 chars ReadlIDFormat is set to 1 in provided by the SU, as received in (ReadlIDFormat=1):
- ncx-cdr-wrapper.ini (advised call initiation message (H.225 910a4b12 cd67d93f
- format): conferenceID field in Setup or 4300abd2 cc10a0a0
- ARQ).
- 4x4 bytes as an hexadecimal RealIDFormat=0:
- string; double words are
- 12.123.54.125.67.235.255.2
- space-separated
- 31.9.12.4.3.7.19.245.65
- When [CDR_FIELDS]
- ReadlIDFormat is set to 0 in
- ncx-cdr-wrapper.ini:
- 16xdecimal notation of a 1-
- byte number (0..255), dot-
- separated.
- This field is never empty.
-03 Call ID String When [CDR_FIELDS] Call identifier provided by the ASM Advised format
- <= 64 chars ReadlIDFormat is set to 1 in in the SU (it can be the CallID or (ReadlIDFormat=1):
- ncx-cdr-wrapper.ini (advised the RealCallID according to what is 910a4b12 cd67d93f
- format): set in the ncx-cdr-wrapper.ini 4300abd2 cc10a0a0
- UseRealCallID field). It is received
- 4x4 bytes as an hexadecimal RealIDFormat=0:
- in call initiation message (H.225
- string; double words are
- callID field in Setup or ARQ). 12.123.54.125.67.235.255.2
- space-separated
- 31.9.12.4.3.7.19.245.65
- When [CDR_FIELDS]
- ReadlIDFormat is set to 0 in
- ncx-cdr-wrapper.ini:
- 16xdecimal notation of a 1-
- byte number (0..255), dot-
- separated.
- This field may be empty if no
- H.225 callID is present in
- ARQ.
-04 Leg number Integer Always set to 0 when the call Call attempt index, starting at 0. 0
- ~ 1 char is not deflected. Incremented whenever a call leg
- to a new destination is created.
- This field is never empty.
- A single call without any call
- forward service will only have 1
- CDR line, whose Leg number is set
- to 0.
- If a call is redirected (on
- CFU/CFB/CNFR), it will generate a
- second CDR line, leg number 1.
- The leg number is then
- incremented on each subsequent
- redirection.
-
-05 Authorize Long It can have two formats as Authorize date and time of the call 1039189431
- timestamp 10 chars given in the ncx-cdr- leg => enable to have a date and
- wrapper.ini by the time if a call is not connected.
- TimestampFormat field. UTC.
- If TimestampFormat is set to This is the ARQ or SETUP or
- 0, the result string INVITE reception timestamp for
- corresponds to the "epoch" the first call leg. For next tickets,
- time, the number of elapsed this is the call deflection processing
- seconds since 1970/01/01 start time. Thus, this value may
- 00:00:00 (UTC) vary in tickets related to a
- complete call.
- If TimestampFormat is set to
- 1, the result string is 20 chars
- in length (format: YYYY-MM-
- DD HH:MM:SS)
- NOTE: if you choose
- TimestampFormat = 0 you
- can have the tenth of second
- (UseTenthOfSecond = 1) or
- the micro second
- (UseMicroSecond = 1)
- NOTE: you can hide
- timestamp equal to 0 (or
- 1970/01/01 00:00:00) with
- the key HideNullTimestamp
- set to 1.
- This field is never empty.
-06 Start timestamp Long It can have two formats as Starting date and time of the call 1039189431
- 10 chars given in the ncx-cdr- leg. UTC.
- wrapper.ini by the
- This is the CONNECT or OK (after
- TimestampFormat field.
- INVITE) reception timestamp. It is
- If TimestampFormat is set to set to the same value for all tickets
- 0, the result string related to a call.
- corresponds to the "epoch"
- time, the number of elapsed
- seconds since 1970/01/01
- 00:00:00 (UTC)
- If TimestampFormat is set to
- 1, the result string is 20 chars
- in length (format: YYYY-MM-
- DD HH:MM:SS)
- 0 (or 1970/01/01 00:00:00)
- means the connection was not
- established for this call leg.
- NOTE: if you choose
- TimestampFormat = 0 you
- can have the tenth of second
- (UseTenthOfSecond = 1) or
- the micro second
- (UseMicroSecond = 1)
- NOTE: you can hide
- timestamp equal to 0 (or
- 1970/01/01 00:00:00) with
- the key HideNullTimestamp
- set to 1.
- This field may be empty if the
- call is not connected.
-07 Duration Long In seconds (0 means the Duration of the call leg (in 6
- <= 10 chars connection was not seconds), after the connection was
- established for this call leg). established.
- NOTE: you can have the tenth Set to 0 for SIP NOTIFICATION
- of second (UseTenthOfSecond and SIP MESSAGE reports.
- = 1) or the micro second
- (UseMicroSecond = 1)
- This field is never empty.
-08 Caller String e164:[number] or h323:[alias] Main Source Alias in pivot format e164:0010033575
- or email:[alias] (provided by the ASM)
- <= 128 chars
- This field may be empty if the If pivot format cannot be
- Caller pivot alias cannot be computed then the main source
- computed. alias is presented in originating
- format and the "O" char is inserted
- See Use Cases section for
- at the beginning of the alias or
- possible cases.
- number.
- NOTE: the phone-context and
- trunk-context are set if present.
-09 Callee String e164:[number] or h323:[alias] E.164 Called Party Number alias or e164:0010033762
- or email:[alias] H323 destination ID in pivot
- <= 128 chars
- format (provided by the ASM)
- This field may be empty if the
- Callee pivot alias cannot be If pivot format cannot be
- computed. computed then the originating
- format is presented and the "O"
- char is inserted at the beginning of
- the alias or number.
- NOTE: the phone-context and
- trunk-context are set if present.
-10 Source IP String ipv4:xx.xx.xx.xx<:port> If ncx-cdr-wrapper.ini/useFullIP = ipv4:192.168.1.2:34123
- 0:
- <= 26 chars This field may be empty if the
- Source IP cannot be retrieved Source IP address of the caller, as
- in IP message mode. used for IP filtering (thus, may be
- either Packet IP address or
- CallSignalAddress, depending on
- su-
- crouting.ini/[defaultH323Parameter
- s]/ipFiltering key
- It can also be changed by the
- selector "extended actions"
- parameter. See "selector extended
- actions" dedicated documentation
- for further information.
- If ncx-cdr-wrapper.ini/useFullIP =
- 1:
- Source IP packet address for the
- call leg
-11 Destination IP String ipv4:xx.xx.xx.xx<:port> If ncx-cdr-wrapper.ini/useFullIP = ipv4:213.56.162.17
- 0:
- <= 26 chars This field may be empty if
- destination IP cannot be Destination IP signaling address
- resolved. for the call leg
- If ncx-cdr-wrapper.ini/useFullIP =
- 1:
- Destination IP packet address for
- the call leg
- NOTE: Can be different from the
- signaling address when routing
- through a proxy group. This field
- refers to the proxy IP address.
- Otherwise IP signaling address and
- IP packet address are the same.
-12 selector Tag String This field is empty for non Extensible tag. See extension tag in=33231412345,vp=165,si
- <= 199 chars Business Services managed format below. =123 tz=Europe/Berlin,
- sources and for Sites with no
- Selector Tag placed on the selector
- PSTN ranges allocated.
- for this call
- See [ref: 2] and [ref: 3] for further
- 2 2
- information.
-13 service Tag Full alphanumeric This field is empty for now. Service Tag placed on the selector
- string or on the vTrunkGroup for this call.
- See [ref: 2] and [ref: 3] for further
- 2
- information.
-14 announcement Full alphanumeric This field is empty for now. Announcement Tag placed on the
- Tag string selector, routeTable or
- vTrunkGroup for this call.
- See [ref: 2]and [ref: 3] for further
- 2
- information.
-15 route Table Tag Full alphanumeric This field is empty for now. Route table Tag placed on the
- string route table for this call.
- See [ref: 2] and [ref: 3] for further
- 2 2
- information.
-16 vTrunkGroup Full alphanumeric This field is empty for now. vTrunkGroupTag placed on the
- Tag string vTrunkGroup for this call.
- See [ref: 2] and [ref: 3] for further
- 2
- information.
-17 vTrunk Tag String This field is empty for non Extensible tag. See extension tag in=33156341289,vp=4232,s
- <= 199 chars Business Services managed format below. i=132,tz=Europe/Paris
- destinations and for Sites with
- vTrunk Tag placed on the vTrunk
- no PSTN ranges allocated.
- for this call.
- See [ref: 2] and [ref: 3] for further
- 2 2
- information.
-18 termination Tag Full alphanumeric This field is empty for now. Termination Tag placed on the
- string Termination for this call.
- See [ref: 2] and [ref: 3] for further
- 2 2
- information.
-19 location group Full alphanumeric This field is empty for now. location group Tag placed on the
- Tag string selector for this call.
- See [ref: 2] and [ref: 3] for further
- 2 2
- information.
-20 GK Originating Full alphanumeric This field is empty for now. Parameter provided by the ASM in
- IP string the SU (reserved for future usage).
-21 GK Terminating Full alphanumeric This field is empty for now. Parameter provided by the ASM in
- IP string the SU (reserved for future usage).
-22 GK Originating Full alphanumeric This field is empty for now. Parameter provided by the ASM in
- Domain string the SU (reserved for future usage).
-23 GK Terminating Full alphanumeric This field is empty for now. Parameter provided by the ASM in
- Domain string the SU (reserved for future usage).
-24 Malicious Call Boolean 0/1 Indicate if a call is malicious or 0
- not. All calls to a specific called
- 1 char
- party will be tagged as malicious
- when the malicious feature has
- been activated.
-25 Service Long 0..31 Bit mask for activated services for 6: at least one
- <= 3 chars this call. TECHNOLOGY and one
- This field is never empty.
- REMOVE service objects
- This is a combination between the
- have been used during
- following values:
- routing process
- 1: if at least one CLIR service
- 10: at least one BASIC-
- object has been used during
- XACTION and one REMOVE
- routing process
- service objects have been
- 2: if at least one REMOVE service used during routing process
- object has been used during
- routing process
- 4: if at least one TECHNOLOGY
- service object has been used
- during routing process
- 8: if at least one BASIC-XACTION
- service object has been used
- during routing process
- 16: if at least one SUBSTITUTION
- service object has been used
- during routing process
- This is independent from the su-
- crouting.ini configuration file and
- in particular from the SPE
- activation.
-26 Termination Long Causes in the range [1-127] Cause of the call termination. 16
- Cause <= 3 chars are standard Q.850 causes
- Causes >= 128 are specific
- Comverse extension causes.
- See [ref. 5] for possible values
- and meanings.
- This field is never empty.
-27 Simulation Call Boolean 0/1 Indicates if a call is a simulation 0
- 1 char call or not.
- This field is never empty.
- SIMULATION CALLS MUST NOT BE
- BILLED.
- Simulation calls can only be
- generated through the Telnet
- interface (tests and diagnostic
- only).
-28 Type One character Optional field depending on Type of CDR: C
- the UseType entry in ncx-cdr-
- 1 char - Call ('C'): for INVITE and SETUP
- wrapper.ini. If set to 1, a
- value in this field will be - Notification ('N') for SIP
- always printed: 'C' by default. NOTIFICATION
- 'C', 'N' or 'M'. - Message ('M') for SIP MESSAGE
- This field is never empty.
-29 ReleaseTimeSta Long Optional field depending of Release date of the leg. 1039189431
- mp 10 chars the UseReleaseTimeStamp
- entry in ncx-cdr-wrapper.ini.
- It can have two formats as
- given in the ncx-cdr-
- wrapper.ini by the
- TimestampFormat field.
- If TimestampFormat is set to
- 0, the result string
- corresponds to the "epoch"
- time, the number of elapsed
- seconds since 1970/01/01
- 00:00:00 (UTC)
- If TimestampFormat is set to
- 1, the result string is 20 chars
- in length (format: YYYY-MM-
- DD HH:MM:SS)
- NOTE: if you choose
- TimestampFormat = 0 you
- can have the tenth of second
- (UseTenthOfSecond = 1) or
- the micro second
- (UseMicroSecond = 1)
- NOTE: you can hide
- timestamp equal to 0 (or
- 1970/01/01 00:00:00) with
- the key HideNullTimestamp
- set to 1.
- This field is empty when no
- CRR message is received and
- therefore it will be empty for
- the CDR describing presence
- message (SIP NOTIFY and SIP
- MESSAGE). It is also empty
- when the CDR is closed by the
- AMU (e.g. if the SU is
- detected as DOWN).
- In all other cases, this field is
- never empty
-30 cgIdentity Tag Full alphanumeric Optional: this field is filled if Extensible tag for Calling Party. pu=33231345123,pr=23
- string usecgidentitytag is set to 1 in See extension tag format below.
- <= 132 chars ncx-cdr-wrapper.ini.
- This field is empty for non
- Business Services/class V
- managed sources.
- The content of this field differs
- between BS and MyCall
- solutions.
-31 cdIdentity Tag Full alphanumeric Optional: this field is filled if Extensible tag for Called Party. See pr=1111,bi=ADMIN
- string usecdidentitytag is set to 1 in extension tag format below.
- <= 132 chars ncx-cdr-wrapper.ini
- This field is empty for non
- Business Services/class V
- managed destinations.
- The content of this field differs
- between BS and MyCall
- solutions.
-32 Originating String Optional: this field is filled if E.164 Main Source alias or H323 e164:0010033575
- Caller <= 128 chars useoriginatingcaller is set to 1 source ID in originating format (as
- in ncx-cdr-wrapper.ini received from the network)
- e164:[number] or h323:[alias] The Main Source alias is computed
- or email:[alias] according to su-core.ini
- configuration.
- NOTE: the phone-context and
- trunk-context are set if present.
-33 Originating String Optional: this field is filled if E.164 Main Destination alias or e164:0010033762
- Callee <= 128 chars useoriginatingcallee is set to 1 H323 destination ID in originating
- in ncx-cdr-wrapper.ini format (as received from the
- network)
- e164:[number] or h323:[alias]
- or email:[alias] The Main Destination alias is
- computed according to su-core.ini
- configuration.
- NOTE: the phone-context and
- trunk-context are set if present.
-34 Terminating String Optional: this field is filled if E.164 Calling Party Number alias or e164:0010033575
- Caller <= 128 chars useterminatingcaller is set to 1 H323 source ID in terminating
- in ncx-cdr-wrapper.ini format (as provided to the
- network).
- e164:[number] or h323:[alias]
- or email:[alias] NOTE: the phone-context and
- trunk-context are set if present.
-35 Terminating String Optional: this field is filled if E.164 Called Party Number alias or e164:0010033762
- Callee <= 128 chars useterminatingcallee is set to H323 destination ID in terminating
- 1 in ncx-cdr-wrapper.ini. format (as provided to the
- network).
- e164:[number] or h323:[alias]
- or email:[alias] NOTE: the phone-context and
- trunk-context are set if present.
- This field may be empty if no
- terminating destination aliases
- can be computed by the CRE
- (missing vtrunk transformation
- or unable to found a vtrunk
- for whatever routing reason),
- or if the pivot to terminating
- destination alias
- transformation leads to an
- empty alias.
-36 Network Long Optional: this field is filled if For H.323 the network timestamp 1039189431
- Timestamp 10 chars usenetworkcompletiontimesta is measured at the first Progress or
- mp is set to 1 in ncx-cdr- ALERT or CONNECT received by
- wrapper.ini. the CCS for direct call.
- For redirected call, the network
- It can have two formats as
- timestamp is measured by the
- given in the ncx-cdr-
- CCS at the redirection decision
- wrapper.ini by the
- point,
- TimestampFormat field.
- NOTE: For H.323 calls, the tcp-ack
- If TimestampFormat is set to
- of the outgoing TCP connection is
- 0, the result string
- not considered in the measure of
- corresponds to the "epoch"
- network timestamp
- time, the number of elapsed
- seconds since 1970/01/01 For SIP the network timestamp is
- 00:00:00 (UTC) measured at the first SESSION
- PROGRESS or RINGING or OK
- If TimestampFormat is set to
- received by the CCS for direct call.
- 1, the result string is 20 chars
- in length (format: YYYY-MM- The network timestamp is
- DD HH:MM:SS) measured at the redirection
- decision point for redirected call.
- NOTE: if you choose
- TimestampFormat = 0 you
- can have the tenth of second
- (UseTenthOfSecond = 1) or
- the micro second
- (UseMicroSecond = 1)
- NOTE: you can hide
- timestamp equal to 0 (or
- 1970/01/01 00:00:00) with
- the key HideNullTimestamp
- set to 1.
- This field may be empty if the
- callee does not answer.
-37 Targeted Integer Optional: this field is filled if Provides information on the 12
- adaptor UseTargetedAdaptors is set to adaptor that has been used: "1"
- <= 2 chars
- 1 in ncx-cdr-wrapper.ini. for adaptor1, "2" for adaptor2 and
- "12" for adaptor1 and adaptor2
- "1", "2" or "12"
- See the amu-core.ini file section
- for further details on adaptors
- definition.
-38 Adaptor1 errors String Optional: this field is filled if Report errors on adaptor1 at the cra,crr
- UseAdaptor1Errors is set to 1 adaptor API level.
- <= 15 chars
- in ncx-cdr-wrapper.ini.
- "nca" (error on the new call
- authorize)
- "cra" (error on the call re-
- authorize)
- "ncr" (error on the new call
- report)
- "crr" (error on the call release
- report)
- When several errors occurred,
- comma separated notation will
- be used.
- Empty when no error has
- been detected.
-39 Source signaling String Optional: this field is filled in Source IP signaling address for the ipv4:192.168.1.2:34123
- IP only if useFullIP is set to 1 in call leg.
- <= 26 chars
- the ncx-cdr-wrapper.ini file.
- It can be changed by the selector
- ipv4:xx.xx.xx.xx<:port> "extended actions" parameter. See
- "selector extended actions"
- This field may be empty if the
- dedicated documentation for
- Source IP cannot be retrieved
- further information.
- in IP message mode.
-40 Destination String Optional: this fields is filled in Destination IP signaling address ipv4:213.56.162.17
- signaling IP only if useFullIP is set to 1 in for the call leg
- <= 26 chars
- ncx-cdr-wrapper.ini file.
- ipv4:xx.xx.xx.xx<:port>, can
- be empty if destination IP
- cannot be resolved.
-41 Source point Unsigned integer Optional: this field is filled in SS7 point code, node identifier 1234
- code only if usePC is set to 1 in the
- <= 5 chars
- ncx-cdr-wrapper.ini file.
- SIP: FROM header [TG-TEL]:
- PC is Encoded in the trunk-
- group part of a "tel" URI
- extension (see also RFC
- 3966).
- H.323: H.225/circuitInfo:
- Encoded in an
- sourceCircuitID.cic.pointCode.
-42 Destination point Unsigned integer Optional: this field is filled in SS7 point code, node identifier 1234
- code only if usePC is set to 1 in the
- <= 5 chars
- ncx-cdr-wrapper.ini file.
- SIP: TO header [TG-TEL]: PC
- is encoded in the trunk-group
- part of a "tel" URI extension
- (see also RFC 3966).
- H.323: H.225/circuitInfo:
- Encoded in a
- destinationCircuitID.cic.pointC
- ode.
-43 Origination tag Full alphanumeric Optional: this field is filled in Origination tag placed on the crr=...,poi=...
- string only if useOriginationTag is origination for this call.
- set to 1 in the ncx-cdr-
- wrapper.ini file.
-44 Proxy group tag Full alphanumeric Optional: this field is filled in Proxy group Tag placed on the
- string only if useProxyGroupTag is proxy group for this call.
- set to 1 in the ncx-cdr-
- wrapper.ini file.
- This field is empty for now.
-45 Advice of Charge String Optional: this field only is filled AOC received. rend=10.2,unit=EURO
- in if UseAoc is set to 1 in ncx-
- <= 50 chars cdr-wrapper.ini file. Available with CCS 3.8.4.
- This field may be empty if
- AOC service is not used or if
- no AOC value is available.
- <aocType>=<amount>,unit=
- <string> with:
- 1. <aocType> (max length:
- 7 chars):
- Received AOC-D: 'rduring'
- Received AOC-E, 'rend'
- Other AOC types are not yet
- supported by the su-core and
- therefore are ignored.
- 2. <amount> (max length:
- 14 chars):
- The amount is decoded from
- the received AOC-D or AOC-E.
- This value is mandatory in an
- AOC.
- 3. unit=<string> (max length:
- 15 chars):
- The unit string is the decoded
- unit value in the received
- AOC-D or AOC-E. This value is
- mandatory in an AOC.
-46 Routing Context String Optional Routing context of the leg. basic
- <= 5 chars 3 possible values: For IMS calls, routing context has
- the value "orig" or "term".
- - basic Otherwise, it is set to "basic".
- - orig
- Dependencies:
- - term
- - amu-core-4.8.0
- - adaptor-generic-cdr-
- 1.8.0
- - ncx-cdr-wrapper-1.8.0
-47 Originating String Optional: this field is filled if E164 Main Source alias or H323 e164:33762
- Original Caller <= 128 chars useoriginatingoriginalcaller is source ID in originating format (as
- set to 1 in ncx-cdr- received from the network) of the
- wrapper.ini. original caller.
- e164:[number] or h323:[alias] The main source alias is computed
- or email:[alias] according to su-core.ini
- configuration.
- NOTE: the phone-context and
- trunk-context are set if present.
- Dependencies:
- - amu-core-4.10.0
- - adaptor-generic-cdr-
- 1.10.0
- - ncx-cdr-wrapper-1.10.0
-48 Pivot Original String Optional: this field is filled if E164 Main Source alias or H323 E164:0010033762
- Caller <= 128 chars usepivotoriginalcaller is set to source ID in pivot format (as
- 1 in ncx-cdr-wrapper.ini. received from the network) of the
- original caller
- e164:[number] or h323:[alias]
- or email:[alias] They are sent if present by SU if
- su-
- crouting.ini/[compatibility]/aliasRe
- porting is 5_0_0 or greater
- NOTE: the phone-context and
- trunk-context are set if present.
- Dependencies:
- - amu-core-4.10.0
- - adaptor-generic-cdr-
- 1.10.0
- - ncx-cdr-wrapper-1.10.0
-49 Terminating String Optional: this field is filled if E164 Main Source alias or H323 E164:0010033762
- Original Caller <= 128 chars useterminatingoriginalcaller is source ID in terminating format (as
- set to 1 in ncx-cdr- received from the network) of the
- wrapper.ini. original caller.
- e164:[number] or h323:[alias] They are sent if present by SU if
- or email:[alias] su-
- crouting.ini/[compatibility]/aliasRe
- porting is 5_0_0 or greater
- NOTE: the phone-context and
- trunk-context are set if present.
- Dependencies:
- - amu-core-4.10.0
- - adaptor-generic-cdr-
- 1.10.0
- - ncx-cdr-wrapper-1.10.0
-50 Pivotclir Boolean Optional: this field is filled if Pivot CLIR calculated with caller clir=0
- UsePivotClir is set to 1 in ncx- information.
- 6 chars cdr-wrapper.ini.
- Dependencies:
- 0 means that Calling Line
- Identification is showed. - amu-core-4.12.0
- 1 means that Calling Line - adaptor-generic-cdr-
- Identification is hidden. 1.12.0
- - ncx-cdr-wrapper-1.12.0
-
diff --git a/FS/FS/cdr/nextone.pm b/FS/FS/cdr/nextone.pm
deleted file mode 100644
index 22e6e86ed..000000000
--- a/FS/FS/cdr/nextone.pm
+++ /dev/null
@@ -1,26 +0,0 @@
-package FS::cdr::nextone;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Nextone',
- 'weight' => 200,
- 'header' => 1,
- 'import_fields' => [
- 'userfield', #CallZoneData ???userfield
- 'channel', #OrigGw
- 'dstchannel', #TermGw
- sub { my( $cdr, $duration ) = @_;
- $cdr->duration($duration);
- $cdr->billsec($duration); }, #Duration
- 'dst', #CallDTMF
- 'src', #Ani
- 'startdate', #DateTimeInt
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/openser.pm b/FS/FS/cdr/openser.pm
deleted file mode 100644
index 87fb82251..000000000
--- a/FS/FS/cdr/openser.pm
+++ /dev/null
@@ -1,24 +0,0 @@
-package FS::cdr::openser;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'OpenSER',
- 'weight' => 15,
- 'header' => 1,
- 'import_fields' => [
- _cdr_date_parser_maker('startdate'),
- _cdr_date_parser_maker('enddate'),
- 'src',
- 'dst',
- 'duration',
- 'channel',
- 'dstchannel',
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/sansay.pm b/FS/FS/cdr/sansay.pm
deleted file mode 100644
index 8087c570e..000000000
--- a/FS/FS/cdr/sansay.pm
+++ /dev/null
@@ -1,408 +0,0 @@
-package FS::cdr::sansay;
-
-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' => 'Sansay VSX',
- 'weight' => 135,
- 'header' => 0, #0 default, set to 1 to ignore the first line, or
- # to higher numbers to ignore that number of lines
- 'type' => 'csv', #csv (default), fixedlength or xls
- 'sep_char' => ';', #for csv, defaults to ,
- 'disabled' => 0, #0 default, set to 1 to disable
-
-
- #listref of what to do with each field from the CDR, in order
- 'import_fields' => [
-
- # "Header" (I do not think this means what you think it means)
- #002452502;V1.10;R;
-
- # Record Sequence Number 9 Unique identification of this record
- 'uniqueid',
-
- '', #Version Number 5 Format version number of records to follow
- # "V1.10"
- '', #Record Type 1 Type of CDR being generated
- # R ­ Normal CDR record, A - Audit
-
- # "Body"
- #WithMedia;181-1071459514@192.188.0.28;0001;Mon Dec 15 11:38:34 2003;Mon Dec 15 11:38:41 2003;Mon Dec 15 11:38:48 2003;480;EndedByRemoteUser;3;T;000200;H323;;192.188.0.38;9001;192.188.0.28;f0faff54-2e6c-11d8-8c4b-bd4d562c2265;192.188.0.38;18044;192.188.0.28;10756;G.729b;240;460;6066;14060;0;0;0;000200;H323;;192.188.0.28;8811;192.188.0.38;e83af3d3-1d2d-d811-9f98-003048424934;192.188.0.38;19236;192.188.0.28;10758;G.729b;460;240;14060;6066;0;0;0;F;9001;305;2;15;305000;00000011 44934567 45231267 2300BCC0;8587542200;
-
- '', #ConnectionType 16 Type of connection : Media or No Media
- '', #SessionID 32 Unique ID assigned to the call by
- # SSM subsystem
- '', #XXX #Release Cause 4 2.4 Internal process Release Cause
-
- #Cause Code Descriptions
- #01 Normal answered call
- #02 No Answer, tear down by originator
- #03 No answer, tear down by the termination
- #04 NORMAL_NO_ANSWER, tear down by
- # system
- #402 Service Not Available
- #403 Termination capability un-compatible
- #404 Outbound digit translation failed
- #405 Termination reject for some other reasons
- #406 Termination Route is blocked
- #500 Originator is not in the Authorized list
- # (source verification failed)
- #501 Origination digit translation failed
- #502 Origination direction is not bi-directional or
- # inbound
- #503 Origination is not in service state
- #600 Max system call handling reached
- #601 System reject call
- #602 System outbound digit translation error
- # (maybe invalid configuration)
- #603 System inbound digit translation error
- # (Maybe invalid configuration)
-
-
- #Start Time of Date 32 Indicates Time of Date when the call
- # entered the system
- _cdr_date_parser_maker('startdate'),
-
- #Answer Time of Date 32 Indicates TOD when the call was
- # answered
- _cdr_date_parser_maker('answerdate'),
-
- #Release TOD 32 Indicates the TOD when the call was
- # disconnected
- _cdr_date_parser_maker('enddate'),
-
- #Minutes West of 32 Minutes West of Greenwich Mean
- #Greenwich Mean Time Time. Used to calculate the time
- # zone.
- '', #XXX use this
-
- #Release Cause from 32 Release cause string from either H323
- #Protocol Stack or SIP protocol stack
- #4. Release Cause String (Field #8 in CDR)
- #- a string of text further identifying the teardown circumstance from terminating protocol message.
- '',
-
- #Binary Value of Release 4 Binary value of the protocol release
- #Cause from Protocol cause
- #stack
- #
- #3. Release Cause from Stack ( Field # 9 in CDR)
- #- an integer value based on the releasing dialogues protocol.
- # a. For a H.323 call leg originated release it will be the real Q.931 value received from the far
- # side.
- #Some of the Q.931 release causes;
- #3: No route to destination
- #16; Normal Clearing
- #17: User Busy
- #19: NO Answer from User
- #21; Call Rejected
- #28: Address Incomplete
- #34: No Circuit Channel Available
- #....
- # b. For a SIP call leg originated release, it's a RFC 3261 release cause value received from the
- # far side.
- #The following is the list that VSX generated if certain event happen:
- #"400 Parse Failed" - Malformed Message
- #"405 Method Not Allowed" - Unsupported Method
- #"480 Temporarily Unavailable" - Overload Throttle Rejection, Max Sessions
- #Exceeded, Demo License Expired, Capacity Exceeded on Route, Radius Server Timeout
- #"415 No valid codec" - No valid codec could be supported between origination and
- #term call legs.
- #"481 Transaction Does Not Exist" - Unknown Transaction or Dialog
- #"487 Transaction Terminated" - Origination Cancel
- #"488 ReInvite Rejected" - Relay of ReInvite was Rejected
- #"504 Server Time-out" - Internal VSX Failure
- #"500 Sequence Out of Order" - CSeq counter violation
- # c. For a VSX system originated release, it an internal release cause for teardown.
- #If the VSX initiates a call teardown, the following cause values and strings are written into the CDR:
- #999, "Demo Licence Expired!"
- #999, "VSX Capacity Exceeded"
- #999, "VSX Operator Reset"
- #999, "Route Rejected"
- #999, "Radius Rejected"
- #999, "Radius Access Timeout"
- #999, "Gatekeeper Reject"
- #999, "Enum Server Reject"
- #999, "Enum Server Timeout"
- #999, "DNS Server Reject"
- #999, "DNS/GK Timeout"
- #999, "Could not allocate media"
- #999, "No Response to INVITE"
- #999, "Ring No Answer Timeout"
- #999, "200 OK Timeout"
- #999, "Maximum Duration Exceeded"
- #987, "Termination Capacity Exceeded"
- #987, "Origination Capacity Exceeded"
- #987, "Term CPS Capacity Exceeded"
- #987, "Orig CPS Capacity Exceeded"
- #987, "Max H323 Legs Exceeded"
- '',
-
- #1st release dialogue 1 O: origination, T: termination
- #2. 1st Release Dialogue ( Field #10 in CDR)
- #- one character value identifying the side of the call that i
- # ,,O ­ origination initiated the teardown.
- # ,,T ­ termination initiated the teardown.
- # ,,N ­ the VSX internally initiated the teardown.
- '',
-
- #Trunk ID -- Origination 6 TrunkID for origination GW(resources)
- 'accountcode', # right? # use cdr-charged_party-accountcode
-
- #VoIP Protocol - Origination 6 VoIP protocol for origination dialogue
- '',
-
- #Origination Source Number 128 Source Number in Origination Dialogue
- 'src',
-
- #Origination Source Host Name 128 FQDN or IP address for Source GW in Origination Dialogue
- 'channel',
-
- #Origination Destination Number 128 Destination Number in Origination
- #Dialogue
- 'dst',
-
- #Origination Destination Host Name 128 FQDN or IP address for Destination
- #GW in Origination Dialogue
- 'dstchannel',
-
- #Origination Call ID 128 Unique ID for the origination dialogue(leg)
- '', #'clid', #? that's not really the same call ID
-
- #Origination Remote 16 Remote Payload IP address for
- # Payload IP origination dialogue
- # Address
- '',
-
- #Origination Remote 6 Remote Payload UDP address for
- # Payload UDP origination dialogue
- # Address
- '',
-
- #Origination Local 16 Local(SG) Payload IP address for
- # Payload IP origination dialogue
- # Address
- '',
-
- #Origination Local 6 Local(SG) Payload UDP address for
- # Payload UDP origination dialogue
- # Address
- '',
-
- #Origination Codec List 128 Supported Codec list( separated by
- # comma) for origination dialogue
- '',
-
- #Origination Ingress 10 Number of Ingress( into Sansay
- # Packets system) payload packets in
- # origination dialogue
- '',
-
- #Origination Egress 10 Number of Egress( out from Sansay
- # Packets system) payload packets in
- # origination dialogue
- '',
-
- #Origination Ingress 10 Number of Ingress( into Sansay
- # Octets system) payload octets in origination
- # dialogue
- '',
-
- #Origination Egress 10 Number of Egress( out from Sansay
- # Octets system) payload octets in origination
- # dialogue
- '',
-
- #Origination Ingress 10 Number of Ingress( into Sansay
- # Packet Loss system) payload packet loss in
- # origination dialogue
- '',
-
- #Origination Ingress 10 Average Ingress( into Sansay system)
- # Delay payload packets delay ( in ms) in
- # origination dialogue
- '',
-
- #Origination Ingress 10 Average of Ingress( into Sansay
- # Packet Jitter system) payload packet Jitter ( in ms)
- # in origination dialogue
- '',
-
- #Trunk ID -- Termination 6 Trunk ID for termination GW(resources)
- 'carrierid',
-
- #VoIP Protocol - 6 VoIP protocol from termination GW
- # Termination
- '',
-
- #Termination Source 128 Source Number in Termination
- # Number Dialogue
- '',
-
- #Termination Source Host 128 FQDN or IP address for Source GW
- # Name in Termination Dialogue
- '',
-
- #Termination Destination 128 Destination Number in Termination
- # Number Dialogue
- '',
-
- #Termination Destination 128 FQDN or IP address for Destination
- # Host Name GW in Termination Dialogue
- '',
-
- #Termination Call ID 128 Unique ID for the termination
- # dialogue(leg)
- '',
-
- #Termination Remote 16 Remote Payload IP address for
- # Payload IP termination dialogue
- # Address
- '',
-
- #Termination Remote 6 Remote Payload UDP address for
- # Payload UDP termination dialogue
- # Address
- '',
-
- #Termination Local 16 Local(SG) Payload IP address for
- # Payload IP termination dialogue
- # Address
- '',
-
- #Termination Local 6 Local(SG) Payload UDP address for
- # Payload UDP termination dialogue
- # Address
- '',
-
- #Termination Codec List 128 Supported Codec list( separated by
- # comma) for termination dialogue
- '',
-
- #Termination Ingress 10 Number of Ingress( into Sansay
- # Packets system) payload packets in
- # termination dialogue
- '',
-
- #Termination Egress 10 Number of Egress( out from Sansay
- # Packets system) payload packets in
- # termination dialogue
- '',
-
- #Termination Ingress 10 Number of Ingress( into Sansay
- # Octets system) payload octets in
- # termination dialogue
- '',
-
- #Termination Egress 10 Number of Egress( out from Sansay
- # Octets system) payload octets in
- # termination dialogue
- '',
-
- #Termination Ingress 10 Number of Ingress( into Sansay
- # Packet Loss system) payload packet loss in
- # termination dialogue
- '',
-
- #Termination Ingress 10 Average Ingress( into Sansay system)
- # Delay payload packets delay ( in ms) in
- # termination dialogue
- '',
-
- #Termination Ingress 10 Average of Ingress( into Sansay
- # Packet Jitter system) payload packet Jitter ( in ms)
- # in termination dialogue
- '',
-
- #Final Route Indication 1 F: Final Route Selection,
- # I: Intermediate Route Attempts
- '',
-
- #Routing Digits 64 Routing Digit (Digit after Inbound
- # translation, before Outbound
- # Translation). This may also be the
- # LRN if LNP feature is enabled
- '',
-
- #Call Duration in Second 6 Call Duration in Seconds. 0 if this is
- # failed call
- 'billsec',
-
- #Post Dial Delay in 6 Post dial delay (from call attempt to
- # Seconds ring). 0 if this is failed call
- '',
-
- #Ring Time in Second 6 Ring Time in Seconds. 0 if this is
- # failed call
- '',
-
- #Duration in milliseconds 10 Call duration in milliseconds.
- '',
-
- #Conf ID 36 Unique Conference ID for this call in
- # Cisco format
- '',
-
- #RPID/ANI 32 Inbound Remote Party ID line or
- # Proxy Asserted Identity if provided
- 'clid', #?
-
- ],
-
-);
-
-1;
-
-__END__
-
-list of freeside CDR fields, useful ones marked with *
-
-N/A acctid - primary key
-FILLED_IN *[1] calldate - Call timestamp (SQL timestamp)
-DONE clid - Caller*ID with text
-DONE * src - Caller*ID number / Source number
-DONE * dst - Destination extension
- dcontext - Destination context
-DONE channel - Channel used
-DONE dstchannel - Destination channel if appropriate
- lastapp - Last application if appropriate
- lastdata - Last application data
-DONE * startdate - Start of call (UNIX-style integer timestamp)
-DONE answerdate - Answer time of call (UNIX-style integer timestamp)
-DONE * enddate - End time of call (UNIX-style integer timestamp)
-* duration - Total time in system, in seconds
-DONE * billsec - Total time call is up, in seconds
-*[2] disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
- amaflags - What flags to use: BILL, IGNORE etc, specified on a per
- channel basis like accountcode.
-DONE *[3] accountcode - CDR account number to use: account
- uniqueid - Unique channel identifier
- userfield - CDR user-defined field
- cdr_type - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
-FILLED_IN *[4] charged_party - Service number to be billed
- upstream_currency - Wholesale currency from upstream
-*[5] upstream_price - Wholesale price from upstream
- upstream_rateplanid - Upstream rate plan ID
- rated_price - Rated (or re-rated) price
- distance - km (need units field?)
- islocal - Local - 1, Non Local = 0
-*[6] calltypenum - Type of call - see FS::cdr_calltype
- description - Description (cdr_type 7&8 only) (used for
- cust_bill_pkg.itemdesc)
- quantity - Number of items (cdr_type 7&8 only)
-DONE carrierid - Upstream Carrier ID (see FS::cdr_carrier)
- upstream_rateid - Upstream Rate ID
- svcnum - Link to customer service (see FS::cust_svc)
- freesidestatus - NULL, done (or something)
-
-[1] Auto-populated from startdate if not present
-[2] Package options available to ignore calls without a specific disposition
-[3] When using 'cdr-charged_party-accountcode' config
-[4] Auto-populated from src (normal calls) or dst (toll free calls) if not present
-[5] When using 'upstream_simple' rating method.
-[6] Set to usage class classnum when using pre-rated CDRs and usage class-based
- taxation (local/intrastate/interstate/international)
-
diff --git a/FS/FS/cdr/simple.pm b/FS/FS/cdr/simple.pm
deleted file mode 100644
index 197b0ebba..000000000
--- a/FS/FS/cdr/simple.pm
+++ /dev/null
@@ -1,52 +0,0 @@
-package FS::cdr::simple;
-
-use strict;
-use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
-use Time::Local;
-use FS::cdr qw(_cdr_min_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Simple',
- 'weight' => 20,
- 'header' => 1,
- 'import_fields' => [
-
- # Date (MM/DD/YY)
- sub { my($cdr, $date) = @_;
- $date =~ /^(\d{1,2})\/(\d{1,2})\/(\d\d(\d\d)?)$/
- or die "unparsable date: $date"; #maybe we shouldn't die...
- #$cdr->startdate( timelocal(0, 0, 0 ,$2, $1-1, $3) );
- ($tmp_mday, $tmp_mon, $tmp_year) = ( $2, $1-1, $3 );
- },
-
- # Time
- sub { my($cdr, $time) = @_;
- #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
- $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
- or die "unparsable time: $time"; #maybe we shouldn't die...
- #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
- $cdr->startdate(
- timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year)
- );
- },
-
- # Source_Number
- 'src',
-
- # Terminating_Number
- 'dst',
-
- # Duration
- _cdr_min_parser_maker, #( [qw( billsec duration)] ),
- #sub { my($cdr, $min) = @_;
- # my $sec = sprintf('%.0f', $min * 60 );
- # $cdr->billsec( $sec );
- # $cdr->duration( $sec );
- # },
-
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/simple2.pm b/FS/FS/cdr/simple2.pm
deleted file mode 100644
index 2e4fb9098..000000000
--- a/FS/FS/cdr/simple2.pm
+++ /dev/null
@@ -1,51 +0,0 @@
-package FS::cdr::simple2;
-
-use strict;
-use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
-use Time::Local;
-use FS::cdr qw(_cdr_min_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Simple (Prerated)',
- 'weight' => 25,
- 'header' => 1,
- 'import_fields' => [
- sub {}, #TEXT_TIME (redundant w/Time)
- sub {}, #Blank
- 'src', #Calling.
-
- #Date (YY/MM/DD)
- sub { my($cdr, $date) = @_;
- $date =~ /^(\d\d(\d\d)?)\/(\d{1,2})\/(\d{1,2})$/
- or die "unparsable date: $date"; #maybe we shouldn't die...
- #$cdr->startdate( timelocal(0, 0, 0 ,$3, $2-1, $1) );
- ($tmp_mday, $tmp_mon, $tmp_year) = ( $4, $3-1, $1 );
- },
-
- #Time
- sub { my($cdr, $time) = @_;
- $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
- or die "unparsable time: $time"; #maybe we shouldn't die...
- #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
- $cdr->startdate(
- timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year)
- );
- },
-
- 'dst', #Dest
- 'userfield', #? #DestinationDesc
-
- #Min
- _cdr_min_parser_maker, #( [qw( billsec duration)] ),
-
- sub {}, #Rate XXX do something w/this, informationally???
- 'upstream_price', #Total
-
- 'accountcode', #ServCode
- 'description', #Service_Type
- ],
-);
-
-
diff --git a/FS/FS/cdr/taqua.pm b/FS/FS/cdr/taqua.pm
deleted file mode 100644
index 26c0bda62..000000000
--- a/FS/FS/cdr/taqua.pm
+++ /dev/null
@@ -1,190 +0,0 @@
-package FS::cdr::taqua;
-
-use strict;
-use vars qw(@ISA %info $da_rewrite);
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Taqua',
- 'weight' => 130,
- 'header' => 1,
- 'import_fields' => [ #some of these are kind arbitrary...
-
- #0
- #RecordType
- sub {
- my($cdr, $field, $conf, $hashref) = @_;
- $hashref->{skiprow} = 1 unless ($field == 0 && $cdr->disposition == 100);
- $cdr->cdrtypenum($field);
- },
-
- sub { my($cdr, $field) = @_; }, #all10#RecordVersion
- sub { my($cdr, $field) = @_; }, #OrigShelfNumber
- sub { my($cdr, $field) = @_; }, #OrigCardNumber
- sub { my($cdr, $field) = @_; }, #OrigCircuit
- sub { my($cdr, $field) = @_; }, #OrigCircuitType
- 'uniqueid', #SequenceNumber
- 'accountcode', #SessionNumber
- 'src', #CallingPartyNumber
- #'dst', #CalledPartyNumber
- #CalledPartyNumber
- sub {
- my( $cdr, $field, $conf ) = @_;
- if ( $cdr->calltypenum == 6 && $cdr->cdrtypenum == 0 ) {
- $cdr->dst("+$field");
- } else {
- $cdr->dst($field);
- }
- },
-
- #10
- _cdr_date_parser_maker('startdate', 'gmt' => 1), #CallArrivalTime
- _cdr_date_parser_maker('enddate', 'gmt' => 1), #CallCompletionTime
-
- #Disposition
- #sub { my($cdr, $d ) = @_; $cdr->disposition( $disposition{$d}): },
- 'disposition',
- # -1 => '',
- # 0 => '',
- # 100 => '',
- # 101 => '',
- # 102 => '',
- # 103 => '',
- # 104 => '',
- # 105 => '',
- # 201 => '',
- # 203 => '',
-
- _cdr_date_parser_maker('answerdate', 'gmt' => 1), #DispositionTime
- sub { my($cdr, $field) = @_; }, #TCAP
- sub { my($cdr, $field) = @_; }, #OutboundCarrierConnectTime
- sub { my($cdr, $field) = @_; }, #OutboundCarrierDisconnectTime
-
- #TermTrunkGroup
- #it appears channels are actually part of trunk groups, but this data
- #is interesting and we need a source and destination place to put it
- 'dstchannel', #TermTrunkGroup
-
-
- sub { my($cdr, $field) = @_; }, #TermShelfNumber
- sub { my($cdr, $field) = @_; }, #TermCardNumber
-
- #20
- sub { my($cdr, $field) = @_; }, #TermCircuit
- sub { my($cdr, $field) = @_; }, #TermCircuitType
- 'carrierid', #OutboundCarrierId
-
- #BillingNumber
- #'charged_party',
- sub {
- my( $cdr, $field, $conf ) = @_;
-
- #could be more efficient for the no config case, if anyone ever needs that
- $da_rewrite ||= $conf->config('cdr-taqua-da_rewrite');
-
- if ( $da_rewrite && $field =~ /\d/ ) {
- my $rewrite = $da_rewrite;
- $rewrite =~ s/\s//g;
- my @rewrite = split(',', $conf->config('cdr-taqua-da_rewrite') );
- if ( grep { $field eq $_ } @rewrite ) {
- $cdr->charged_party( $cdr->src() );
- $cdr->calltypenum(12);
- return;
- }
- }
- if ( $cdr->is_tollfree ) { # thankfully this is already available
- $cdr->charged_party($cdr->dst); # and this
- } else {
- $cdr->charged_party($field);
- }
- },
-
- sub { my($cdr, $field) = @_; }, #SubscriberNumber
- 'lastapp', #ServiceName
- sub { my($cdr, $field) = @_; }, #some weirdness #ChargeTime
- 'lastdata', #ServiceInformation
- sub { my($cdr, $field) = @_; }, #FacilityInfo
- sub { my($cdr, $field) = @_; }, #all 1900-01-01 0#CallTraceTime
-
- #30
- sub { my($cdr, $field) = @_; }, #all-1#UniqueIndicator
- sub { my($cdr, $field) = @_; }, #all-1#PresentationIndicator
- sub { my($cdr, $field) = @_; }, #empty#Pin
- 'calltypenum', #CallType
-
- #nothing below is used by QIS...
-
- sub { my($cdr, $field) = @_; }, #Balt/empty #OrigRateCenter
- sub { my($cdr, $field) = @_; }, #Balt/empty #TermRateCenter
-
- #OrigTrunkGroup
- #it appears channels are actually part of trunk groups, but this data
- #is interesting and we need a source and destination place to put it
- 'channel', #OrigTrunkGroup
-
- 'userfield', #empty#UserDefined
- sub { my($cdr, $field) = @_; }, #empty#PseudoDestinationNumber
- sub { my($cdr, $field) = @_; }, #all-1#PseudoCarrierCode
-
- #40
- sub { my($cdr, $field) = @_; }, #empty#PseudoANI
- sub { my($cdr, $field) = @_; }, #all-1#PseudoFacilityInfo
- sub { my($cdr, $field) = @_; }, #OrigDialedDigits
- sub { my($cdr, $field) = @_; }, #all-1#OrigOutboundCarrier
- sub { my($cdr, $field) = @_; }, #IncomingCarrierID
- 'dcontext', #JurisdictionInfo
- sub { my($cdr, $field) = @_; }, #OrigDestDigits
- sub { my($cdr, $field) = @_; }, #huh?#InsertTime
- sub { my($cdr, $field) = @_; }, #key
- sub { my($cdr, $field) = @_; }, #empty#AMALineNumber
-
- #50
- sub { my($cdr, $field) = @_; }, #empty#AMAslpID
- sub { my($cdr, $field) = @_; }, #empty#AMADigitsDialedWC
- sub { my($cdr, $field) = @_; }, #OpxOffHook
- sub { my($cdr, $field) = @_; }, #OpxOnHook
-
- #acctid - primary key
- #AUTO #calldate - Call timestamp (SQL timestamp)
-#clid - Caller*ID with text
- #XXX src - Caller*ID number / Source number
- #XXX dst - Destination extension
- #dcontext - Destination context
- #channel - Channel used
- #dstchannel - Destination channel if appropriate
- #lastapp - Last application if appropriate
- #lastdata - Last application data
- #startdate - Start of call (UNIX-style integer timestamp)
- #answerdate - Answer time of call (UNIX-style integer timestamp)
- #enddate - End time of call (UNIX-style integer timestamp)
- #HACK#duration - Total time in system, in seconds
- #HACK#XXX billsec - Total time call is up, in seconds
- #disposition - What happened to the call: ANSWERED, NO ANSWER, BUSY
-#INT amaflags - What flags to use: BILL, IGNORE etc, specified on a per channel basis like accountcode.
- #accountcode - CDR account number to use: account
-
- #uniqueid - Unique channel identifier (Unitel/RSLCOM Event ID)
- #userfield - CDR user-defined field
-
- #X cdrtypenum - CDR type - see FS::cdr_type (Usage = 1, S&E = 7, OC&C = 8)
- #XXX charged_party - Service number to be billed
-#upstream_currency - Wholesale currency from upstream
-#X upstream_price - Wholesale price from upstream
-#upstream_rateplanid - Upstream rate plan ID
-#rated_price - Rated (or re-rated) price
-#distance - km (need units field?)
-#islocal - Local - 1, Non Local = 0
-#calltypenum - Type of call - see FS::cdr_calltype
-#X description - Description (cdr_type 7&8 only) (used for cust_bill_pkg.itemdesc)
-#quantity - Number of items (cdr_type 7&8 only)
-#carrierid - Upstream Carrier ID (see FS::cdr_carrier)
-#upstream_rateid - Upstream Rate ID
-
- #svcnum - Link to customer service (see FS::cust_svc)
- #freesidestatus - NULL, done (or something)
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/taqua_om.pm b/FS/FS/cdr/taqua_om.pm
deleted file mode 100644
index c94ea5923..000000000
--- a/FS/FS/cdr/taqua_om.pm
+++ /dev/null
@@ -1,19 +0,0 @@
-package FS::cdr::taqua_om;
-
-use strict;
-use vars qw( %info );
-use base qw( FS::cdr::taqua );
-
-%info = (
- %FS::cdr::taqua::info,
- 'name' => 'Taqua OM',
- 'weight' => 132,
- 'header' => 0,
- 'sep_char' => ';',
- 'row_callback' => sub { my $row = shift;
- $row =~ s/^<\d+>\|[\da-f\|]+\|(\d+;)/$1/;
- $row;
- },
-);
-
-1;
diff --git a/FS/FS/cdr/telos_csv.pm b/FS/FS/cdr/telos_csv.pm
deleted file mode 100644
index 3faff79cd..000000000
--- a/FS/FS/cdr/telos_csv.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-package FS::cdr::telos_csv;
-
-use strict;
-use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year );
-use Time::Local;
-use FS::cdr qw(_cdr_min_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Telos (CSV)',
- 'weight' => 535,
- 'header' => 1,
- 'import_fields' => [
-
- # Date (MM/DD/YY)
- sub { my($cdr, $date) = @_;
- $date =~ /^(\d{1,2})\/(\d{1,2})\/(\d\d(\d\d)?)$/
- or die "unparsable date: $date";
- ($tmp_mday, $tmp_mon, $tmp_year) = ( $2, $1-1, $3 );
- },
-
- # Time
- sub { my($cdr, $time) = @_;
- $time =~ /^(\d{1,2}):(\d{1,2}):(\d{1,2})$/
- or die "unparsable time: $time";
- $cdr->enddate(
- timelocal($3, $2, $1 ,$tmp_mday, $tmp_mon, $tmp_year)
- );
- },
- '', #RAS-Client
- sub { #Record-Type
- my($cdr, $rectype, $conf, $param) = @_;
- $param->{skiprow} = 1 if lc($rectype) ne 'stop';
- },
- skip(24), #Full-Name, Auth-Type, User-Name, NAS-IP-Address, NAS-Port,
- #Service-Type, Framed-Protocol, Framed-IP-Address,
- #Framed-IP-Netmask, Framed-Routing, Filter-ID, Framed-MTU,
- #Framed-Compression, Login-IP-Host, Login-Service, Login-TCP-Port,
- #Callback-Number, Callback-ID, Framed-Route, Framed-IPX-Network,
- #Class, Session-Timeout, Idle-Timeout, Termination-Action
- #I told you it was a RADIUS log
- 'dst', # Called-Station-ID, always 'X' in sample data
- 'src', # Calling-Station-ID
- skip(8), #NAS-Identifier, Proxy-State, Acct-Status-Type, Acct-Delay-Time,
- #Acct-Input-Octets, Acct-Output-Octets, Acct-Session-Id,
- #Acct-Authentic
- sub {
- my ($cdr, $sec) = @_;
- $cdr->duration($sec);
- $cdr->billsec($sec);
- $cdr->startdate($cdr->enddate - $sec);
- },
- skip(75), #everything else
- ],
-);
-
-sub skip { map {''} (1..$_[0]) }
-
-1;
diff --git a/FS/FS/cdr/telos_xml.pm b/FS/FS/cdr/telos_xml.pm
deleted file mode 100644
index a144f0ba4..000000000
--- a/FS/FS/cdr/telos_xml.pm
+++ /dev/null
@@ -1,36 +0,0 @@
-package FS::cdr::telos_xml;
-
-use strict;
-use vars qw( @ISA %info );
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Telos (XML)',
- 'weight' => 530,
- 'type' => 'xml',
- 'xml_format' => {
- 'xmlrow' => [ 'Telos_CDRS', 'CDRecord' ],
- 'xmlkeys' => [ qw(
- seq_num
- a_party_num
- b_party_num
- seize
- answer
- disc
- ) ],
- },
-
- 'import_fields' => [
- 'uniqueid',
- 'src',
- 'dst', # usually empty for some reason
- _cdr_date_parser_maker('startdate'),
- _cdr_date_parser_maker('answerdate'),
- _cdr_date_parser_maker('enddate'),
- ],
-
-);
-
-1;
diff --git a/FS/FS/cdr/transnexus.pm b/FS/FS/cdr/transnexus.pm
deleted file mode 100644
index 0ed7ad4ef..000000000
--- a/FS/FS/cdr/transnexus.pm
+++ /dev/null
@@ -1,66 +0,0 @@
-package FS::cdr::transnexus;
-
-use strict;
-use base qw( FS::cdr );
-use vars qw( %info );
-use MIME::Base64;
-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
- sub { $_[0]->clid( decode_base64($_[1]) ); }, #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.
-
diff --git a/FS/FS/cdr/troop.pm b/FS/FS/cdr/troop.pm
deleted file mode 100644
index 020af2b20..000000000
--- a/FS/FS/cdr/troop.pm
+++ /dev/null
@@ -1,128 +0,0 @@
-package FS::cdr::troop;
-
-use strict;
-use base qw( FS::cdr );
-use vars qw( %info $tmp_mon $tmp_mday $tmp_year );
-use Time::Local;
-#use FS::cdr qw( _cdr_date_parser_maker _cdr_min_parser_maker );
-
-%info = (
- 'name' => 'Troop',
- 'weight' => 220,
- 'header' => 2,
- 'type' => 'xls',
-
- 'import_fields' => [
-
- # CDR FIELD / REQUIRED / Notes
-
- # / No / CDR sequence number
- sub {},
-
- # WTN / Yes
- 'charged_party',
-
- # Account Code / Yes / Account Code (security) and we need on invoice
- 'accountcode',
-
- # DT / Yes / "DATE" Excel
- # XXX false laziness w/bell_west.pm
- sub { my($cdr, $date) = @_;
-
- my $datetime = DateTime::Format::Excel->parse_datetime( $date );
- $tmp_mon = $datetime->mon_0;
- $tmp_mday = $datetime->mday;
- $tmp_year = $datetime->year;
- },
-
- # Time / Yes / "TIME" excel
- sub { my($cdr, $time) = @_;
- #my($sec, $min, $hour, $mday, $mon, $year)= localtime($cdr->startdate);
-
- #$sec = $time * 86400;
- my $sec = int( $time * 86400 + .5);
-
- #$cdr->startdate( timelocal($3, $2, $1 ,$mday, $mon, $year) );
- $cdr->startdate(
- timelocal(0, 0, 0, $tmp_mday, $tmp_mon, $tmp_year) + $sec
- );
- },
-
-
- # Dur. / Yes / Units = seconds
- 'billsec',
-
- # OVS Type / Maybe / add "011" to international calls
- # N = DOM LD / normal
- # Z = INTL LD
- # O = INTL LD
- # others...?
- sub { my($cdr, $ovs) = @_;
- my $pre = ( $ovs =~ /^\s*[OZ]\s*$/i ) ? '011' : '1';
- $cdr->dst( $pre. $cdr->dst ) unless $cdr->dst =~ /^$pre/;
- },
-
- # Number / YES
- 'src',
-
- # City / No
- 'channel',
-
- # Prov/State / No / We will use your Freeside rating and description name
- sub { my($cdr, $state) = @_;
- $cdr->channel( $cdr->channel. ", $state" )
- if $state;
- },
-
- # Number / Yes
- 'dst',
-
- # City / No
- 'dstchannel',
-
- # Prov/State / No / We will use your Freeside rating and description name
- sub { my($cdr, $state) = @_;
- $cdr->dstchannel( $cdr->dstchannel. ", $state" )
- if $state;
- },
-
- # OVS / Maybe
- # Would help to add "011" to international calls (if you are willing)
- # (using ovs above)
- sub { my($cdr, $ovs) = @_;
- my @ignore = ( 'BELL', 'CANADA', 'UNITED STATES', );
- $cdr->dstchannel( $cdr->dstchannel. ", $ovs" )
- if $ovs && ! grep { $ovs =~ /^\s*$_\s*$/ } @ignore;
- },
-
- # CC Ind. / No / Does show if Calling card but should not be required
- #'N' or 'E'
- sub {},
-
- # Call Charge / No / Bell billing info and is not required
- 'upstream_price',
-
- # Account # / No / Bell billing info and is not required
- sub {},
-
- # Net Charge / No / Bell billing info and is not required
- sub {},
-
- # Surcharge / No / Taxes and is not required
- sub {},
-
- # GST / No / Taxes and is not required
- sub {},
-
- # PST / No / Taxes and is not required
- sub {},
-
- # HST / No / Taxes and is not required
- sub {},
-
- ],
-
-);
-
-1;
-
diff --git a/FS/FS/cdr/unitel.pm b/FS/FS/cdr/unitel.pm
deleted file mode 100644
index df34a57c1..000000000
--- a/FS/FS/cdr/unitel.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-package FS::cdr::unitel;
-
-use strict;
-use vars qw(@ISA %info);
-use FS::cdr;
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Unitel/RSLCOM',
- 'weight' => 500,
- 'import_fields' => [
- 'uniqueid',
- #'cdr_type',
- 'cdrtypenum',
- 'calldate', # may need massaging? huh maybe not...
- #'billsec', #XXX duration and billsec?
- sub { $_[0]->billsec( $_[1] );
- $_[0]->duration( $_[1] );
- },
- 'src',
- 'dst', # XXX needs to have "+61" prepended unless /^\+/ ???
- 'charged_party',
- 'upstream_currency',
- 'upstream_price',
- 'upstream_rateplanid',
- 'distance',
- 'islocal',
- 'calltypenum',
- 'startdate', #XXX needs massaging
- 'enddate', #XXX same
- 'description',
- 'quantity',
- 'carrierid',
- 'upstream_rateid',
- ]
-);
-
-1;
diff --git a/FS/FS/cdr/vitelity.pm b/FS/FS/cdr/vitelity.pm
deleted file mode 100644
index 97ed0c375..000000000
--- a/FS/FS/cdr/vitelity.pm
+++ /dev/null
@@ -1,25 +0,0 @@
-package FS::cdr::vitelity;
-
-use strict;
-use vars qw( @ISA %info );
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'Vitelity',
- 'weight' => 100,
- 'header' => 1,
- 'import_fields' => [
- # Cheers to Vitelity for their concise, readable CDR format.
- _cdr_date_parser_maker('startdate'),
- 'src',
- 'dst',
- 'duration',
- 'clid',
- 'disposition',
- 'upstream_price',
- ],
-);
-
-1;
diff --git a/FS/FS/cdr/wip.pm b/FS/FS/cdr/wip.pm
deleted file mode 100644
index 19c45c680..000000000
--- a/FS/FS/cdr/wip.pm
+++ /dev/null
@@ -1,48 +0,0 @@
-package FS::cdr::wip;
-
-use strict;
-use vars qw( @ISA %info );
-use FS::cdr qw(_cdr_date_parser_maker);
-
-@ISA = qw(FS::cdr);
-
-%info = (
- 'name' => 'WIP',
- 'weight' => 100,
- 'header' => 1,
- 'type' => 'csv',
- 'sep_char' => ':',
- 'import_fields' => [
-# All of these are based on the January 2010 version of the spec,
-# except that we assume that before all the fields mentioned in the
-# spec, there's a counter field.
- skip(4), # counter, id, APCSJursID, RecordType
- sub { my($cdr, $data, $conf, $param) = @_;
- $param->{skiprow} = 1 if $data == 1;
- $cdr->uniqueid($data);
- }, # CDRID; is 1 for line charge records
- skip(1), # AccountNumber; empty
- 'charged_party', # ServiceNumber
- skip(1), # ServiceNumberType
- 'src', # PointOrigin
- 'dst', # PointTarget
- 'calltypenum', # Jurisdiction: need to remap
- _cdr_date_parser_maker('startdate'), #TransactionDate
- skip(3), # BillClass, TypeIDUsage, ElementID
- 'duration', # PrimaryUnits
- skip(6), # CompletionStatus, Latitude, Longitude,
- # OriginDescription, TargetDescription, RatePeriod
- 'billsec', # RatedUnits; seems to always be equal to PrimaryUnits
- skip(6), #SecondsUnits, ThirdUnits, FileID, OriginalExtractSequenceNumber,
- #RateClass, #ProviderClass
- skip(8), #ProviderID, CurrencyCode, EquipmentTypeCode, ClassOfServiceCode,
- #RateUnitsType, DistanceBandID, ZoneClass, CDRStatus
- 'upstream_price', # ISPBuy
- skip(2), # EUBuy, CDRFromCarrier
- ],
-
-);
-
-sub skip { map {''} (1..$_[0]) }
-
-1;