[Asterisk-Users] DTMF to Email
Kristian Kielhofner
kris at krisk.org
Mon Mar 7 14:59:08 MST 2005
Eric Balsa wrote:
> I need some suggestions (not necessarily using Asterisk?) on how to
> accomplish the following in the easiest way possible. I would like to have a
> ~3 prompt VM system, that would ask for some numbers from a caller (case
> number, id and another id). It would then take their DTMF presses and format
> an email to a predetermined address (i.e. the email always goes to the same
> place). I don't really care about the format so much as long as the emails
> are the same. I.E
>
> Lets say I enter
> VM Prompt 1: 2004123441
> VM Prompt 2: 5955
> VM Prompt 3: 34
>
> It would format email and send it out something like:
>
> To:updates at example.com
> Subject: 2004123441 5955
> 34
>
> Anyone know of something cheap and easy to handle this problem?
>
> TIA,
> --Eric
Eric,
Asterisk could do this very easily:
exten => s,1,Read(CASENO)
exten => s,2,Read(ID1)
exten => s,3,Read(ID2)
exten => s,4,TrySystem(/usr/bin/mymail ${CASENO} ${ID} ${ID2})
exten => s,5,Hangup
Then, /usr/bin/mymail could look like this:
#!/bin/bash
MAILADD=kris at testmail.com
echo -e "$1 \n $3" | mail -s $2 $MAILADD
The output mail should look like this (with $1 - 3 filled in with the
values from above):
To: kris at testmail.com
Subject: $2
$1
$3
--
Kristian Kielhofner
More information about the asterisk-users
mailing list