[freeside-commits] branch master updated. 69b1f712cbc76d6ab2671288c314c2f596af06b9

Ivan ivan at 420.am
Wed Jan 9 17:05:32 PST 2013


The branch, master has been updated
       via  69b1f712cbc76d6ab2671288c314c2f596af06b9 (commit)
      from  e0c74fc65bab0afcbedbae00aa06957c99f4c5f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 69b1f712cbc76d6ab2671288c314c2f596af06b9
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Jan 9 17:05:31 2013 -0800

    add asterisk format that skips clid, RT#20669

diff --git a/FS/FS/cdr/asterisk_skip_clid.pm b/FS/FS/cdr/asterisk_skip_clid.pm
new file mode 100644
index 0000000..1a105b3
--- /dev/null
+++ b/FS/FS/cdr/asterisk_skip_clid.pm
@@ -0,0 +1,45 @@
+package FS::cdr::asterisk_skip_clid;
+
+use strict;
+use vars qw(@ISA %info);
+use FS::cdr qw(_cdr_date_parser_maker);
+
+ at 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 (skip Caller ID)',
+  'weight'        => 11,
+  'import_fields' => [
+    'accountcode',
+    'src',
+    'dst',
+    'dcontext',
+    'SKIP_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;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cdr/{asterisk.pm => asterisk_skip_clid.pm} |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
 copy FS/FS/cdr/{asterisk.pm => asterisk_skip_clid.pm} (86%)




More information about the freeside-commits mailing list