summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-25 17:05:57 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-25 17:05:57 -0800
commit43e84a0aa8e478e9c642aa91574578442b620c6b (patch)
treed7b31b0fd5c9ef6279ea0dfa150d70e20684ca3b /lib
parentfc79953ad4a0b0438d963a6bcdb011d20279a7d8 (diff)
initial version appears to be hooked up and working against dev sandbox
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/VoIP_Innovations.pm66
1 files changed, 51 insertions, 15 deletions
diff --git a/lib/Net/VoIP_Innovations.pm b/lib/Net/VoIP_Innovations.pm
index b24f590..b3380ee 100644
--- a/lib/Net/VoIP_Innovations.pm
+++ b/lib/Net/VoIP_Innovations.pm
@@ -23,13 +23,16 @@ our $errstr = '';
use Net::VoIP_Innovations 3;
- my $handle = Net::VoIP_Innovations->new(
+ my $voip_innovations = Net::VoIP_Innovations->new(
'login' => 'tofu',
- 'password' => 'beast',
- 'debug' => 1,
+ 'password' => 'beast', #secret
);
- #DID functions
+
+ ##
+ # DID functions
+ ##
+
#auditDIDs
#queryDID
#reserveDID
@@ -37,12 +40,53 @@ our $errstr = '';
#configDID
#releaseDID
- #911 Functions
+
+ ###
+ # 911 Functions
+ ###
+
#insert911
+ my $response = $voip_innovations->insert911(
+ 'did' => '4155551212',
+ 'address1' => '1234 Test Lane',
+ 'address2' => '',
+ 'city' => 'Testington',
+ 'state' => 'CA',
+ 'zip' => '95454',
+ 'plusFour' => '',
+ 'callerName' => 'Joe Caller',
+ );
+ if ( $response->{'responseCode'} != 100 ) {
+ die $response->{'responseMessage'};
+ }
+
#update911
+ my $response = $voip_innovations->update911(
+ 'did' => '4155551212',
+ 'address1' => '1234 Test Lane',
+ 'address2' => '',
+ 'city' => 'Testington',
+ 'state' => 'CA',
+ 'zip' => '95454',
+ 'plusFour' => '',
+ 'callerName' => 'Joe Caller',
+ );
+ if ( $response->{'responseCode'} != 100 ) {
+ die $response->{'responseMessage'};
+ }
+
#remove911
+ my $response = $voip_innovations->remove911(
+ 'did' => '4155551212',
+ );
+ if ( $response->{'responseCode'} != 100 ) {
+ die $response->{'responseMessage'};
+ }
+
- #Locator Functions
+ ###
+ # Locator Functions
+ ###
...
@@ -59,8 +103,6 @@ as a hash reference or a flat list of names and values.
=item password (secret) (required)
-=item debug
-
=back
=cut
@@ -73,7 +115,6 @@ sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = ref($_[0]) ? shift : { @_ };
- $self->{'debug'} ||= 0;
bless($self, $class);
}
@@ -126,8 +167,6 @@ the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-VoIP_I
automatically be notified of progress on your bug as I make changes.
-
-
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
@@ -158,9 +197,6 @@ L<http://search.cpan.org/dist/Net-VoIP_Innovations>
=back
-=head1 ACKNOWLEDGEMENTS
-
-
=head1 COPYRIGHT & LICENSE
Copyright 2008-2014 Freeside Internet Services, Inc. (http://freeside.biz/)
@@ -176,7 +212,7 @@ The Freeside software includes support for VoIP Innovations integration, CDR
rating, invoicing, credit card and electronic check processing, integrated
trouble ticketing, and customer signup and self-service web interfaces.
-http://freeside.biz/freeside/
+L<http://freeside.biz/freeside/>
=cut