default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / FS / FS / cdr.pm
index 85fccac..e0c4bd4 100644 (file)
@@ -185,6 +185,8 @@ following fields are currently supported:
 
 =item detailnum - Link to invoice detail (L<FS::cust_bill_pkg_detail>)
 
+=item sipcallid - SIP Call-ID
+
 =back
 
 =head1 METHODS
@@ -1870,10 +1872,11 @@ 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'});
+  if ( grep defined $opt->{$_}, qw(cdrtypenum carrierid) ) {
+        $opt->{preinsert_callback} = sub {
+                my($record, $param) = @_;
+                $record->$_($opt->{$_})
+                  foreach grep defined $opt->{$_}, qw(cdrtypenum carrierid);
                 '';
         };
   }