diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Schema.pm | 7 | ||||
-rw-r--r-- | FS/FS/cdr.pm | 48 |
2 files changed, 54 insertions, 1 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 52e119083..67ef612f3 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -2142,7 +2142,12 @@ sub tables_hashref { ], 'primary_key' => 'acctid', 'unique' => [], - 'index' => [ [ 'calldate' ], [ 'src' ], [ 'dst' ], [ 'charged_party' ], [ 'accountcode' ], [ 'carrierid' ], [ 'freesidestatus' ], [ 'freesiderewritestatus' ], [ 'cdrbatch' ], ], + 'index' => [ [ 'calldate' ], + [ 'src' ], [ 'dst' ], [ 'dcontext' ], [ 'charged_party' ], + [ 'accountcode' ], [ 'carrierid' ], + [ 'freesidestatus' ], [ 'freesiderewritestatus' ], + [ 'cdrbatch' ], + ], }, 'cdr_termination' => { diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index 7b1ee7a7e..96132ec90 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -153,6 +153,54 @@ points to. You can ask the object for a copy with the I<hash> method. sub table { 'cdr'; } +sub table_info { + { + 'fields' => { +#XXX fill in some (more) nice names + #'acctid' => '', + 'calldate' => 'Call date', + 'clid' => 'Caller ID', + 'src' => 'Source', + 'dst' => 'Destination', + 'dcontext' => 'Dest. context', + 'channel' => 'Channel', + 'dstchannel' => 'Destination channel', + #'lastapp' => '', + #'lastdata' => '', + 'startdate' => 'Start date', + 'answerdate' => 'Answer date', + 'enddate' => 'End date', + 'duration' => 'Duration', + 'billsec' => 'Billable seconds', + 'disposition' => 'Disposition', + 'amaflags' => 'AMA flags', + 'accountcode' => 'Account code', + #'uniqueid' => '', + 'userfield' => 'User field', + #'cdrtypenum' => '', + 'charged_party' => 'Charged party', + #'upstream_currency' => '', + 'upstream_price' => 'Upstream price', + #'upstream_rateplanid' => '', + #'ratedetailnum' => '', + 'rated_price' => 'Rated price', + #'distance' => '', + #'islocal' => '', + #'calltypenum' => '', + #'description' => '', + #'quantity' => '', + 'carrierid' => 'Carrier ID', + #'upstream_rateid' => '', + 'svcnum' => 'Freeside service', + 'freesidestatus' => 'Freeside status', + 'freesiderewritestatus' => 'Freeside rewrite status', + 'cdrbatch' => 'Batch', + }, + + }; + +} + =item insert Adds this record to the database. If there is an error, returns the error, |