Device-Gsm
view release on metacpan or search on metacpan
lib/Device/Gsm.pm view on Meta::CPAN
#
sub forward {
my ($self, $reason, $mode, $number) = @_;
$reason = lc $reason || 'unconditional';
$mode = lc $mode || 'register';
$number ||= '';
my %reasons = (
'unconditional' => 0,
'busy' => 1,
'no reply' => 2,
'unreachable' => 3
);
my %modes = (
'disable' => 0,
'enable' => 1,
'query' => 2,
'register' => 3,
'erase' => 4
lib/Device/Gsm.pm view on Meta::CPAN
$gsm->delete_sms(1, 'ME');
# Deletes 3rd message from sim card
$gsm->delete_sms(3, 'SM');
By default, it uses the currently set storage, via the C<storage()> method.
=head2 forward()
Sets call forwarding. Accepts three arguments: reason, mode and number.
Reason can be the string C<unconditional>, C<busy>, C<no reply> and
C<unreachable>. Mode can be the string C<disable>, C<enable>, C<query>,
C<register>, C<erase>.
Example:
# Set unconditional call forwarding to +47 123456789
$gsm->forward('unconditional','register','+47123456789');
# Erase unconditional call forwarding
$gsm->forward('unconditional','erase');
( run in 0.290 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )