X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fglobalpops_voip.pm;h=5eee13f340d44f29b6842a0e2fcb3ec98995257d;hb=38e34bbc53a4222c7507e95914e1364a5a74623f;hp=52a4ec2a18cc579a21c497e3254084503747ce23;hpb=a75d0d61ee8904b4e40198cdf9a170a297656e8d;p=freeside.git diff --git a/FS/FS/part_export/globalpops_voip.pm b/FS/FS/part_export/globalpops_voip.pm index 52a4ec2a1..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; } @@ -247,7 +256,7 @@ sub get_dids { sub gp_command { my( $self, $command, @args ) = @_; - eval "use Net::GlobalPOPs::MediaServicesAPI;"; + eval "use Net::GlobalPOPs::MediaServicesAPI 0.03;"; if ( $@ ) { warn $@; die $@; @@ -359,7 +368,7 @@ sub _export_unsuspend { sub globalpops_voip_command { my($login, $password, $method, @args) = @_; - eval "use Net::GlobalPOPs::MediaServicesAPI;"; + eval "use Net::GlobalPOPs::MediaServicesAPI 0.03;"; die $@ if $@; my $gp = new Net::GlobalPOPs