1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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;
|