mailing incoming calls via sendmail

Marc Eberhard (marc@athene.thphy.uni-duesseldorf.de)
Fri, 5 Jun 1998 17:49:24 +0200


-----BEGIN PGP SIGNED MESSAGE-----

Hi!

Thomas Wimmer wrote:
> I am fairly new to this vgetty-thing, so bear with me. (although I'm
> reading this list quite a time).
> 
> After vgetty recorded an incoming call, what does it do then ?

It checks, if the voice.conf option message_program is non zero and
if true, executes this script. The arguments for the script are:

$1 - file name of the message
$2 - CallerId
$3 - CallName

> I do want to mail the incoming message via sendmail to me.
> For this to work I use the following script (as root):
> 
> #!/bin/sh
> rmdtopvf /var/spool/voice/incoming/va00216.rmd | pvfspeed -s 8000 |
> pvftowav | uuencode ab.wav | /usr/sbin/sendmail -fvoiceadm
> -FAnruf\-Beantworter voice
> 
> But I do have two problems:
> How do I (or more precisey the script) know which filename the incoming
> message has, and
> how can I let vgetty start the script after vgetty has done its job ?

Define "message_program /usr/local/bin/my_script_wherever_it_is" and
replace your script with:

#!/bin/sh
rmdtopvf $1 | pvfspeed -s 8000 |
pvftowav | uuencode ab.wav | /usr/sbin/sendmail -fvoiceadm
- -FAnruf\-Beantworter voice

That should be all.

Bye,
Marc
_______________________________________________________________________________
Email: Marc.Eberhard@Poseidon.ThPhy.Uni-Duesseldorf.DE
WWW:   http://Poseidon.ThPhy.Uni-Duesseldorf.DE/~marc/
PGP:   http://Poseidon.ThPhy.Uni-Duesseldorf.DE/~marc/Marc_PGP.key

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBNXgTgzR1rYTfG0TdAQFgMQQAhFQNJjAO0+i7bmd4PXRr0oUrws5ew740
YMO1tLIlsBhFnC2i+W2DK9wk0WJAFpRkaKcNC9BClt9ySUZ48w+68Wk6BytVArvq
y40OJWUgXHStmmgmhVNxeL5zs31p1RoFgoR+aZMwZIVIJRBsjnF70IX2v9i9GBDr
UPDqMCiHRPw=
=xByk
-----END PGP SIGNATURE-----