WebService::Nonoh - make nonoh calls from Perl
version 0.1
my $no = WebService::Nonoh->new( service => 'nonoh.net', user => $username, pass => $password, printer => sub { print +shift, ': ', @_, "\n" } ); $no->login; $no->bala; $no->call('+1234567', '+7654321'); $no->login; $no->sms($username, '+7654321', "Hello Mr."); $no->logout;
You can use Nonoh or a compatible web service, many of betamax might work. This module allows you to send SMS or connect calls from Perl. Please also see nonoh for the docs of command line app.
Warning: The websites do have a captcha if you're unlucky. Then this script also won't work...
create new webservice object. the following settings must be specified:
website address of service to use, e.g. nonoh.net
nonoh.net
username for log in
password for your account
connect a function here that is called to print any status messages or progress information. default is to use Perl's print function
print
command line helper function, please see nonoh
issue log-in request to website
send SMS, following parameters are expected:
a "from" address (must be registered in the web interface first)
phone number to send SMS message to
the message content
establish a call between two phone numbers, following parameters are expected:
the number that should be called first, in international format
the number that should be called after the first one has been picked up.
this method enquires your balance and "free days" (free minutes to selected destinations received after charging the account). if the parameter $to_printer is true, it will send output directly to the printer, otherwise a pair of ($balance_string, $freedays_string) is returned.
if log-in failed, two empty strings are returned.
issue log-out request to the website
Ailin Nemui <ailin at devio dot us>
This software is copyright (c) 2013 by Ailin Nemui.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::Nonoh, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Nonoh
CPAN shell
perl -MCPAN -e shell install WebService::Nonoh
For more information on module installation, please visit the detailed CPAN module installation guide.