summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorlevinse <levinse>2011-01-11 02:03:45 +0000
committerlevinse <levinse>2011-01-11 02:03:45 +0000
commit51e350319a224c3212ab9406da7ecf3ebe8f285d (patch)
tree97bf7361e5e0075134913553fa7379aa30fd9174 /FS
parent8d2c52788f3af69c1c0da7c6c884918eef3b24ec (diff)
Vitelity API improvements for toll-free and vfax, RT11009
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/part_export/vitelity.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/FS/FS/part_export/vitelity.pm b/FS/FS/part_export/vitelity.pm
index d44335b65..5654affa3 100644
--- a/FS/FS/part_export/vitelity.pm
+++ b/FS/FS/part_export/vitelity.pm
@@ -15,6 +15,11 @@ tie my %options, 'Tie::IxHash',
'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 = (
@@ -247,15 +252,13 @@ sub _export_insert {
$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';
}