[freeside-commits] freeside/FS/FS/part_export globalpops_voip.pm, 1.7, 1.7.6.1
Ivan,,,
ivan at wavetail.420.am
Tue Jan 11 19:12:04 PST 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv11310
Modified Files:
Tag: FREESIDE_2_1_BRANCH
globalpops_voip.pm
Log Message:
globalpops is now voip innovations, fix phone number fetch
Index: globalpops_voip.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/globalpops_voip.pm,v
retrieving revision 1.7
retrieving revision 1.7.6.1
diff -u -w -d -r1.7 -r1.7.6.1
--- globalpops_voip.pm 11 Oct 2009 01:41:56 -0000 1.7
+++ globalpops_voip.pm 12 Jan 2011 03:12:00 -0000 1.7.6.1
@@ -9,15 +9,15 @@
@ISA = qw(FS::part_export);
tie my %options, 'Tie::IxHash',
- 'login' => { label=>'GlobalPOPs Media Services API login' },
- 'password' => { label=>'GlobalPOPs Media Services API password' },
- 'endpointgroup' => { label=>'GlobalPOPs endpoint group number' },
+ 'login' => { label=>'VoIP Innovations API login' },
+ 'password' => { label=>'VoIP Innovations API password' },
+ 'endpointgroup' => { label=>'VoIP Innovations endpoint group number' },
'dry_run' => { label=>"Test mode - don't actually provision" },
;
%info = (
'svc' => 'svc_phone',
- 'desc' => 'Provision phone numbers to GlobalPOPs VoIP',
+ 'desc' => 'Provision phone numbers to VoIP Innovations (formerly GlobalPOPs VoIP)',
'options' => \%options,
'notes' => <<'END'
Requires installation of
@@ -69,7 +69,7 @@
if ( $search->{'statuscode'} == 302200 ) {
return [];
} elsif ( $search->{'statuscode'} != 100 ) {
- die "Error running globalpop getDIDs: ".
+ die "Error running VoIP Innovations getDIDs: ".
$search->{'statuscode'}. ': '. $search->{'status'}; #die??
}
@@ -94,7 +94,7 @@
my $lata_dids = $self->gp_command('getDIDs', %getdids, 'lata'=>$lata);
my $lata_search = $lata_dids->{'search'};
unless ( $lata_search->{'statuscode'} == 100 ) {
- die "Error running globalpop getDIDs: ". $lata_search->{'status'}; #die??
+ die "Error running VoIP Innovations getDIDs: ". $lata_search->{'status'}; #die??
}
my $l = $lata_search->{state}{lata}{'rate_center'};
@@ -141,15 +141,17 @@
my $tn = $npa->{nxx}{tn} || $npa->{nxx}{$opt{'exchange'}}{tn};
- my @tn = ref($tn) ? @$tn : ($tn);
+ my @tn = ref($tn) eq 'ARRAY' ? @$tn : ($tn);
#push @return, @tn;
- push @return, map {
+ push @return,
+ map {
if ( /^\s*(\d{3})(\d{3})(\d{4})\s*$/ ) {
"$1-$2-$3";
} else {
$_;
}
}
+ map { ref($_) eq 'HASH' ? $_->{'content'} : $_ } #tier always 2?
@tn;
} elsif ( $opt{'areacode'} ) { #return city (npa-nxx-XXXX)
@@ -268,7 +270,7 @@
my $rdid = $r->{did};
if ( $rdid->{'statuscode'} != 100 ) {
- return "Error running globalpop reserveDID: ".
+ return "Error running VoIP Innovations reserveDID: ".
$rdid->{'statuscode'}. ': '. $rdid->{'status'};
}
@@ -282,7 +284,7 @@
my $adid = $a->{did};
if ( $adid->{'statuscode'} != 100 ) {
- return "Error running globalpop assignDID: ".
+ return "Error running VoIP Innovations assignDID: ".
$adid->{'statuscode'}. ': '. $adid->{'status'};
}
@@ -311,7 +313,7 @@
my $rdid = $r->{did};
if ( $rdid->{'statuscode'} != 100 ) {
- return "Error running globalpop releaseDID: ".
+ return "Error running VoIP Innovations releaseDID: ".
$rdid->{'statuscode'}. ': '. $rdid->{'status'};
}
More information about the freeside-commits
mailing list