<% include('/elements/header.html', 'Phone number (DID) import') %> Import a file containing phone numbers (DIDs).

<% include( '/elements/form-file_upload.html', 'name' => 'PhonenumImportForm', 'action' => 'process/phone_avail-import.html', 'num_files' => 1, 'fields' => [ 'format', 'availbatch', 'exportnum', 'countrycode' ], 'message' => 'DID import successful', 'url' => $p."search/phone_avail.html?availbatch=$availbatch", ) %> <% &ntable("#cccccc", 2) %> <% include( '/elements/tr-select-table.html', 'table' => 'part_export', 'name_col' => 'machine', 'label' => 'Export', 'empty_label' => 'Select export', 'hashref' => { 'exporttype' => 'internal_diddb', }, #'label_callback' => ) %> Country code <% include( '/elements/file-upload.html', 'field' => 'file', 'label' => 'Filename', ) %>
Uploaded files can be CSV (comma-separated value) files or Excel spreadsheets. The file should have a .CSV or .XLS extension.

Default format has the following field order: state, number

Field information: <% include('/elements/footer.html') %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Import'); my $conf = new FS::Conf; my $availbatch = time2str('webimport-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);