[NBLUG/talk] Vgetty Help

gandalf at sonic.net gandalf at sonic.net
Fri Feb 22 15:46:42 PST 2013


I'm trying to get an out-dialer working. I work for a telephone company and we need to check messages on a ton of numbers on a regular basis. I used the perl module Modem::Vgetty which just sits on top of the normal software in the debian environment.

The outdialer works great for calling my cell phone, but for some reason doesn't detect connection when dialing real numbers. It could be because the messages generated are at the phone company so the call never actually connects. I've been trying various combinations for some time. The modem is an internal USR Sportster.

This is one of the numbers that just times out recording nothing: 8778388463

Here is my current code:

#!/usr/bin/perl
use Modem::Vgetty;
my $phone = shift;
my $dial  = "1" . $phone;
my $message = "/root/bin/calls/" . $phone . ".rmd";
my $voice   = new Modem::Vgetty;
$voice->device('DIALUP_LINE');
$voice->add_handler('BUSY_TONE', 'finish',
                sub { $voice->stop; });
$voice->add_handler('SILENCE_DETECTED', 'finish2',
                sub { $voice->stop; });
$voice->add_handler('NO_ANSWER', 'finish3',
                sub { $voice->stop; });
$voice->add_handler('UNKNOWN_EVENT', 'finish4',
                sub { $voice->stop; });

$voice->enable_events;

$voice->dial($dial);
$voice->wait(15);
$voice->stop;
$voice->waitfor('READY');

$voice->record($message);
$voice->wait(10);
$voice->stop;
$voice->waitfor('READY');

$voice->send('QUOTE ATZ');
$voice->waitfor('READY');
$voice->shutdown;

exit 0;


 



More information about the talk mailing list