[ale] audible caller id
Geoffrey
esoteric at 3times25.net
Mon Oct 14 14:49:40 EDT 2002
tfreeman at intel.digichem.net wrote:
> Hmmm. That audible caller id & voice/fax stuff sounds interesting. Is
> there a howto or other documentation somewhere, or should somebody
> encourage you to perform the public service? 8-)
I'm planning on having it on all my lines (3), that way I can get rid of
all these auto telemarketers.
It's really not all that difficult. You obviously need a modem that
supports caller id. I'm using an external USR 56k fax modem.
There are various getty packages, but I use mgetty. In the setup of
mgetty, you tell it all kinds of things, one of which is, what to
execute when you get a call. I pass it the name of a perl script that
looks at the caller id info, and based on it, will decide whether to
answer the call as a fax, or just let it ring. Here's the beginning of
the script to give you an idea: (I hate posting perl, as Fletch always
makes it better. :) Hey fletch, note my use of 'use strict'):
#!/usr/bin/perl
# use diagnostics;
use strict;
# 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";
`/home/esoteric/shl/text2talk "Call rejected from $na"&`;
close(FH);
exit 1;
}
sub accepted {
my ($na, $nu) = @_;
print FH "Accept: \"$na\" from: <$nu>\n";
`/home/esoteric/shl/text2talk "Call accepted from $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()) . " : ";
# if my mother-in-law is calling, reject the call
if ($num == /7775551212/) { reject($name, $num); }
From there you just call accept() or reject() one you've decided (based
on the caller id info) whether to answer the call or not. mgetty reads
the return value of the script in order to determine whether to answer
the call.
Further it calls another script that calls festival. Festival is a text
to voice engine. There are rpm's available, but none that will work
with Mandrake 9.0. I'm working on building it from source.
I'd be glad to share further info with anyone who would like to leverage
this.
Oh yeah, the text2talk script mentioned in the perl script calls a
festival binary like this:
echo "(SayText \"$*\")" | festival --pipe
Cool and simple huh?
--
Until later: Geoffrey esoteric at 3times25.net
I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list