add option to limit automatic unsuspensions to a specific suspension reason type...
[freeside.git] / bin / cdr-ivr.import
index 9a4eb0d..212482d 100755 (executable)
@@ -33,7 +33,6 @@ FS::cdr::Import->dbi_import(
     #                             $_[0]->{NXX}. $_[0]->{LOCAL_NUMBER};
     #                           },
     'description'       => 'DESCRIPTION', # or upstream_dst_regionname ?
-    #'' => 'DETAIL', #
     #'' => 'PER_CALL_CHARGE', #
     #'' => 'PER_MINUTE_CHARGE', #
     #'' => 'PER_CALL_SURCHARGE', #
@@ -46,7 +45,10 @@ FS::cdr::Import->dbi_import(
     #'' => 'CONVERSION_RATE', #
     'lastapp'           => 'MODULE_NAME', #
     'src'               => 'ANI', # 'clid' => 'ANI', #
-    'dst'               => 'DNIS',
+    'dst'               => sub { $_[0]->{'COUNTRY_CODE'} !~ /^1/
+                                   ? "011". $_[0]->{'DETAIL'}
+                                   : $_[0]->{'DETAIL'};
+                               },
     #'' => 'SALES_GROUP', #
     #'' => 'TAX_GROUP', #
     'userfield'         => 'USER_1', #
@@ -66,6 +68,7 @@ FS::cdr::Import->dbi_import(
     #'' => 'GRACE_PERIOD', # SMALLINT Grace period associated with the call
     #'' => 'ACCOUNT_TYPE', # Account type from ACCOUNT_TYPES table
   },
+  'batch_name' => 'IVR',
 );
 
 1;