'routesip' => { label=>'routesip (optional sub-account)' },
'type' => { label=>'type (optional DID type to order)' },
'fax' => { label=>'vfax service', type=>'checkbox' },
+ 'restrict_selection' => { type=>'select',
+ label=>'Restrict DID Selection',
+ options=>[ '', 'tollfree', 'non-tollfree' ],
+ }
+
;
%info = (
$vparams{'type'} = $self->option('type')
if defined $self->option('type');
-
$command = 'getlocaldid';
$success = 'success';
# this is OK as Vitelity for now is US/CA only; it's not a hack
- $command = 'gettollfree' if $vparams{'did'} =~ /^800|^88[8765]/;
+ $command = 'gettollfree' if $vparams{'did'} =~ /^800|^888|^877|^866|^855/;
if($self->option('fax')) {
- # supposedly should work for toll-free fax too
$command = 'getdid';
$success = 'ok';
}
</%doc>
% if ( $use_selector ) {
+% if ( $export->exporttype eq 'vitelity' &&
+% ( $export->option('restrict_selection') eq 'non-tollfree'
+% || !$export->option('restrict_selection')) ) {
<TABLE>
<TR>
</TABLE>
-% if ( $tollfree ) {
- or toll-free
+% }
+% if ( $export->exporttype eq 'vitelity' &&
+% ( $export->option('restrict_selection') eq 'tollfree'
+% || !$export->option('restrict_selection')) ) {
+ <font size="-1">Toll-free</font>
<% include('/elements/select-phonenum.html',
'svcpart' => $svcpart,
'empty' => 'Select phone number',
my $use_selector = scalar(@exports) ? 1 : 0;
-my $tollfree = 0;
-$tollfree = 1 if (scalar(@exports) && $exports[0]->exporttype eq 'vitelity');
+my $export;
+$export = $exports[0] if scalar(@exports);
my $bulknum = $opt{'bulknum'} || 0;