From: Ivan Kohler Date: Sun, 26 Jan 2014 01:05:57 +0000 (-0800) Subject: initial version appears to be hooked up and working against dev sandbox X-Git-Url: http://git.freeside.biz/gitweb/?p=Net-VoIP_Innovations.git;a=commitdiff_plain;h=43e84a0aa8e478e9c642aa91574578442b620c6b initial version appears to be hooked up and working against dev sandbox --- 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 =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 =cut