[ale] Need CID popup that works with vgetty
Geoffrey
esoteric at 3times25.net
Sun Apr 27 00:44:50 EDT 2003
Jim Seymour wrote:
> On Mon, 21 Apr 2003, Geoffrey wrote:
>
>
>>I don't use vgetty, but I'll assume that it works just like mgetty since
>>it's the voice extension of the same. I actually have mgetty execute a
>>script when I get a call and the cid is passed to the script. The
>>script calls festival so that I have audible caller id.
>>
>>Festival is a text to voice converter, so rather than looking for a
>>window pop up, I hear the caller id info.
>>
>>You could do the same by taking advantage of the ability to call a
>>script and have it pop up a tcl window or something.>
>>
>
> Hi Geoffrey,
> Thanks for your response to my inquiry about a caller id popup
> that will work with vgetty. Sorry I am so late coming back to you on
> this. My new modem arrived and I have been fighting other problems
> getting it to work with vgetty. I am curious about the script you use
> that captures the caller id information and passes it off to festival. Is
> this a script you wrote yourself or did you get it from somewhere else?
> I know know nothing about writing scripts so any direction you can point
> me in for help is greatly appreciated. Again this is a RedHat 7.3 system
> if that is any help.
I wrote the script myself. It does a bit more then just announcing the
caller info. It has the ability to accept or reject the call. I put
this together so that I could stop receiving the unsolicited faxes I'd
been getting.
It's perl, I've included it below. I love doing that, because every
time I do, Fletch teaches me something about Perl. :) It's not well
documented, but the changes one might need to make to make use of it are
pretty straightforward. Look for the @acceptNumberList and
@acceptNameList arrays. I've replaced my accept values with a couple of
dummies so that you might get an idea of how it works.
#!/usr/bin/perl
# use diagnostics;
use strict;
# Put accepted numbers in this array
my @acceptNumberList = ( "5551234311", "5552331234);
# Put accepted names in this array
my @acceptNameList = ( "Publishers Clearing House", "President Bush");
my $foo;
# Usage callerid.pl from_tty calling_number name dist_ring_id called_no;
sub rejected {
my ($na, $nu) = @_;
print FH "REJECT: \"$na\" from: <$nu>\n";
$na = "Call rejected from $na";
`su esoteric -c "/home/esoteric/shl/text2talk $na&"`;
close(FH);
exit 1;
}
sub accepted {
my ($na, $nu) = @_;
print FH "Accept: \"$na\" from: <$nu>\n";
$na = "Call accepted from $na";
`su esoteric -c "/home/esoteric/shl/text2talk $na&"`;
close(FH);
exit 0;
}
open(FH, ">> /home/esoteric/memo/callerid.lst");
my ($tty, $num, $name, $dist_ring, $called_no);
($tty, $num, $name, $dist_ring, $called_no) = @ARGV;
printf FH scalar(localtime()) . " : ";
# Accept all..
# accepted("$name", $num);
foreach $foo (@acceptNumberList) {
$num =~ /^$foo/ && accepted("$name", $num);
}
foreach $foo (@acceptNameList) {
$name =~ /^$foo/ && accepted("$name", $num);
}
rejected($name, $num);
--
Until later: Geoffrey esoteric at 3times25.net
The latest, most widespread virus? Microsoft end user agreement.
Think about it...
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list