diff options
author | levinse <levinse> | 2011-06-09 22:11:04 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-06-09 22:11:04 +0000 |
commit | 7f4e4fddb595f5c825a18c88ed79029160650dc9 (patch) | |
tree | e0ad5e02d1916aa3c1f0165725fd4ec1a9e9c1fc /FS/FS/cdr.pm | |
parent | fdc247b504359ca9e74f63daa771f49393fd70ed (diff) |
SMSC CDRs (Kannel) and cdrtypenum option on cdr sftp import script, RT10991
Diffstat (limited to 'FS/FS/cdr.pm')
-rw-r--r-- | FS/FS/cdr.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm index e7b6e6c..36721a8 100644 --- a/FS/FS/cdr.pm +++ b/FS/FS/cdr.pm @@ -948,6 +948,14 @@ sub batch_import { my $iopt = _import_options; $opt->{$_} = $iopt->{$_} foreach keys %$iopt; + if ( defined $opt->{'cdrtypenum'} ) { + $opt->{'preinsert_callback'} = sub { + my($record,$param) = (shift,shift); + $record->cdrtypenum($opt->{'cdrtypenum'}); + ''; + }; + } + FS::Record::batch_import( $opt ); } |