-=item downstream_csv [ OPTION => VALUE, ... ]
-
-=cut
-
-my %export_names = (
- 'convergent' => {},
- 'simple' => { 'name' => 'Simple',
- 'invoice_header' =>
- "Date,Time,Name,Destination,Duration,Price",
- },
- 'simple2' => { 'name' => 'Simple with source',
- 'invoice_header' =>
- #"Date,Time,Name,Called From,Destination,Duration,Price",
- "Date,Time,Called From,Destination,Duration,Price",
- },
-);
-
-my %export_formats = (
- 'convergent' => [
- 'carriername', #CARRIER
- sub { shift->_convergent_format('src') }, #SERVICE_NUMBER
- sub { shift->_convergent_format('charged_party') }, #CHARGED_NUMBER
- sub { time2str('%Y-%m-%d', shift->calldate_unix ) }, #DATE
- sub { time2str('%T', shift->calldate_unix ) }, #TIME
- 'billsec', #'duration', #DURATION
- sub { shift->_convergent_format('dst') }, #NUMBER_DIALED
- '', #XXX add (from prefixes in most recent email) #FROM_DESC
- '', #XXX add (from prefixes in most recent email) #TO_DESC
- 'calltypename', #CLASS_CODE
- 'rated_price', #PRICE
- sub { shift->rated_price ? 'Y' : 'N' }, #RATED
- '', #OTHER_INFO
- ],
- 'simple' => [
- sub { time2str('%D', shift->calldate_unix ) }, #DATE
- sub { time2str('%r', shift->calldate_unix ) }, #TIME
- 'userfield', #USER
- 'dst', #NUMBER_DIALED
- sub { sprintf('%.2fm', shift->billsec / 60 ) }, #DURATION
- sub { sprintf('%.3f', shift->upstream_price ) }, #PRICE
- ],
- 'simple2' => [
- sub { time2str('%D', shift->calldate_unix ) }, #DATE
- sub { time2str('%r', shift->calldate_unix ) }, #TIME
- #'userfield', #USER
- 'dst', #NUMBER_DIALED
- 'src', #called from
- sub { sprintf('%.2fm', shift->billsec / 60 ) }, #DURATION
- sub { sprintf('%.3f', shift->upstream_price ) }, #PRICE
- ],
-);
-