X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fglobalpops_voip.pm;h=5eee13f340d44f29b6842a0e2fcb3ec98995257d;hb=e5e1826c3f6421303594b03067aea5a4ee4f67ad;hp=6df21f40624fca43ea3d89cd545bf2806ddfed8d;hpb=0f1ddc8e2690c592ca4cfad3d7d22dc6dab4ddbe;p=freeside.git diff --git a/FS/FS/part_export/globalpops_voip.pm b/FS/FS/part_export/globalpops_voip.pm index 6df21f406..5eee13f34 100644 --- a/FS/FS/part_export/globalpops_voip.pm +++ b/FS/FS/part_export/globalpops_voip.pm @@ -5,6 +5,7 @@ use Tie::IxHash; use FS::Record qw(qsearch dbh); use FS::part_export; use FS::phone_avail; +use Data::Dumper; @ISA = qw(FS::part_export); @@ -19,6 +20,7 @@ tie my %options, 'Tie::IxHash', 'svc' => 'svc_phone', 'desc' => 'Provision phone numbers to VoIP Innovations (formerly GlobalPOPs VoIP)', 'options' => \%options, + 'no_machine' => 1, 'notes' => <<'END' Requires installation of Net::GlobalPOPs::MediaServicesAPI @@ -28,6 +30,8 @@ END sub rebless { shift; } +sub can_get_dids { 1; } + sub get_dids { my $self = shift; my %opt = ref($_[0]) ? %{$_[0]} : @_; @@ -73,8 +77,13 @@ sub get_dids { if ( $search->{'statuscode'} == 302200 ) { return []; } elsif ( $search->{'statuscode'} != 100 ) { - my $error = "Error running VoIP Innovations getDIDs: ". - $search->{'statuscode'}. ': '. $search->{'status'}. "\n"; + + my $error = "Error running VoIP Innovations getDIDs: "; + if ( $search->{'statuscode'} || $search->{'status'} ) { + $error .= $search->{'statuscode'}. ': '. $search->{'status'}. "\n"; + } else { + $error .= Dumper($search); + } warn $error; die $error; }