1 package Net::VoIP_Innovations;
7 #SOAP::Lite->import(+trace=>'debug');
11 Net::VoIP_Innovations - Interface to VoIP Innovations API
15 our $VERSION = '3.00_01';
16 our $URI = 'http://dev.voipinnovations.com/VOIP/Services/APIService.asmx';
17 our $NS = 'http://tempuri.org'; #nice one
24 use Net::VoIP_Innovations 3;
26 my $voip_innovations = Net::VoIP_Innovations->new(
28 'password' => 'beast', #secret
49 my $response = $voip_innovations->insert911(
50 'did' => '4155551212',
51 'address1' => '1234 Test Lane',
53 'city' => 'Testington',
57 'callerName' => 'Joe Caller',
59 if ( $response->{'responseCode'} != 100 ) {
60 die $response->{'responseMessage'};
64 my $response = $voip_innovations->update911(
65 'did' => '4155551212',
66 'address1' => '1234 Test Lane',
68 'city' => 'Testington',
72 'callerName' => 'Joe Caller',
74 if ( $response->{'responseCode'} != 100 ) {
75 die $response->{'responseMessage'};
79 my $response = $voip_innovations->remove911(
80 'did' => '4155551212',
82 if ( $response->{'responseCode'} != 100 ) {
83 die $response->{'responseMessage'};
95 =head2 new HASHREF | OPTION, VALUE ...
97 Creates a new Net::VoIP_Innovations object. Options may be passed
98 as a hash reference or a flat list of names and values.
102 =item login (required)
104 =item password (secret) (required)
110 # If there is an error,
111 #returns false and sets an error string which may be queried with the I<errstr>
116 my $class = ref($proto) || $proto;
117 my $self = ref($_[0]) ? shift : { @_ };
118 bless($self, $class);
129 unless ref($class) && $class->isa('Net::VoIP_Innovations');
135 sub DESTROY { }; # no-op
139 my $opts = ref($_[0]) ? shift : { @_ };
141 $AUTOLOAD =~ /(^|::)(\w+)$/ or die "unparsable AUTOLOAD: $AUTOLOAD";
144 $opts->{'login'} ||= $self->{'login'};
145 $opts->{'secret'} ||= $self->{'password'};
146 my @soap_opts = map { SOAP::Data->name($_)->value( $opts->{$_} ) }
153 ->on_action( sub { join '/', @_ } )
154 ->$function( @soap_opts )
161 Ivan Kohler, C<< <ivan-net-voipinnovations at freeside.biz> >>
165 Please report any bugs or feature requests to C<bug-net-voip_innovations at rt.cpan.org>, or through
166 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-VoIP_Innovations>. I will be notified, and then you'll
167 automatically be notified of progress on your bug as I make changes.
172 You can find documentation for this module with the perldoc command.
174 perldoc Net::VoIP_Innovations
177 You can also look for information at:
181 =item * RT: CPAN's request tracker
183 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-VoIP_Innovations>
185 =item * AnnoCPAN: Annotated CPAN documentation
187 L<http://annocpan.org/dist/Net-VoIP_Innovations>
191 L<http://cpanratings.perl.org/d/Net-VoIP_Innovations>
195 L<http://search.cpan.org/dist/Net-VoIP_Innovations>
200 =head1 COPYRIGHT & LICENSE
202 Copyright 2008-2014 Freeside Internet Services, Inc. (http://freeside.biz/)
204 This program is free software; you can redistribute it and/or modify it
205 under the same terms as Perl itself.
210 Need a complete, open-source back-office and customer self-service solution?
211 The Freeside software includes support for VoIP Innovations integration, CDR
212 rating, invoicing, credit card and electronic check processing, integrated
213 trouble ticketing, and customer signup and self-service web interfaces.
215 L<http://freeside.biz/freeside/>