avoid errors trying to import v12-style amaflags to our int field, RT#83146
[freeside.git] / FS / bin / freeside-cdr-asterisk_sql
index a5a570d..3d9096c 100755 (executable)
@@ -130,6 +130,8 @@ while ( my $row = $sth->fetchrow_hashref ) {
 
   $cdr->cdrbatchnum($cdrbatchnum);
 
+  $cdr->amaflags('') unless $cdr->amaflags =~ /^(\d+)$/;
+
   if ( my $error = $cdr->insert ) {
     log_msg( error =>
       sprintf 'Non-fatal failure to import acctid(%s) from table(%s): %s',