TCL?

Klaus Weidner (klaus@snarc.greenie.muc.de)
Tue, 1 Mar 1994 13:44:00 +0100


nelson@crynwr.com (Russell Nelson) wrote:
> Is there any enthusiasm for am mgetty that is controlled by TCL?  For
> example, TCL is an easy way to suck up configuration options.

Configuration files are already planned and even partially coded, but
it will take some time to integrate them.

> TCL also lets you do all sorts of interesting things with the vgetty
> answering machine.  For example, I hate transcribing phone numbers.
> So, I'd start my message off with "Please enter your phone number
> followed by pound".  Then I'd record the DTMF digits so that when I
> wanted to call them back, the modem could do the dialing.

I tried to do the same things via shell scripts, which I think are 
easier for non-TCL-gurus to modify. vgetty calls an external program
at various points, i.e. after receiving a message or after getting
a DTMF code. I use bourne shell scripts for these programs, you
could use Perl or TCL instead.

Most of the functionality needed for voice mailbox operations ought to
be included in zplay by now, i.e. you can use something like this
in a shell script to get the phone number:

	NUM=`zplay -StC $VM/TypeYourPhoneNumberNow`

This will play the voice file and store the DTMF digits received in
$NUM.

Something that is still missing, but that I'm working on, is to 
replace the entire answering sequence with a shell script. Currently
this is only possible for voice calls, if you want fax or data 
capability, you'll have to use the normal message-beep-record
flow of control. It shouldn't be too hard to implement, however,
I'm thinking about using the external program's return code to
tell vgetty what to do now, i.e. hang up, try a data connect or
whatever.

I will make this optional, since the C code is probably more
robust (no need to spawn additional processes). It would be useful
for special cases, though.

By the way, the current vgetty version ought to be able to handle
the case you mention - use a greeting message like `After the beep,
you can either leave a message or type your phone number using
DTMF codes'. When vgetty detects the DTMF digits, it will call
the vg_dtmf script, this could simply send the digits received
to somebody via email, or (with a fancier shell script) read
back the numbers detected with a speech synthesizer and allow the
caller to correct them or to add a voice message.

> TCL doesn't make mgetty that much bigger.  modgetty (which uses TCL but
> whose record is broken) is only about 40K bigger including the shared
> TCL library.

I'm not exactly thrilled with the idea, since it would require a rewrite
of much of the code (plus a book on TCL and a lot of spare time...).
If you want TCL, you could write the external programs as a TCL script
and use the zplay binary for the voice functions.

Klaus
-- 
\ klaus@snarc.greenie.muc.de--kweidner@physik.tu-muenchen.de--2:246/55.4
\ .signature error -- quote dumped