These notes briefly describe what I did to get my old pentium machine running Debian to answer my phone and record messages.
apt-get install mgetty mgetty-voice mgetty-pvftools
I believe RedHat uses the name vgetty instead of mgetty-voice.
mgetty(8) means "modem getty(8)", and the pvftools allow you to play/record/convert audio into the specific modem audio formats.
I tried and failed to get it to work with a USRobotics Sportster 33 and a Dynalink modem, but got it working with a USRobotics "56k Voice Faxmodem".
- A bit of background on the audio file formats. .pvf is an Acronym? for Portable Voice Format. It is an intermediate format used by mgetty-voice. You can convert (mono) .wav (MS Wave) audio files using wavtopvf. You can then use pvftormd to convert from .pvf to the modem specific .rmd format files. One caveat is that (at least for me) the audio needs to be mono and at 8000 Hz. So, I recorded a wave file of my answerphone message, and then converted it as follows
- convert to mono (one channel), 8000Hz
sox recording.wav -c 1 -r 8000 greeting.wav
- convert to pvf (32 bits per sample is default)
wavtopvf -16 greeting.wav > greeting.pvf
- convert to modem-specific rmd file
pvftormd US_Robotics 1 < greeting.pvf > greeting.rmd
- You can use pvfspeed to change the sample rate if you don't have sox
- pvfspeed -s 8000 greeting.pvf | pvftormd US_Robotics 1 > greeting.rmd
- The standard way to run vgetty is from init(1)?. Add to/modify /etc/inittab to have a line such as
- T0:23:respawn:/usr/sbin/vgetty ttyS0
for a modem on the first serial port, or
for the second serial port.
The main configuration file in debian is /etc/mgetty/voice.conf
- The file has lots of comments telling you what all the settings mean and do. The settings I found most useful
- Default number of rings to wait before picking up the phone.
- This means you can get vgetty to see if an incoming call is
- a telephone, and if not you can pass it to a fax program and/or
- modem program (such as mgetty :)
- use my custom script instead of just the default, which is to
- play the greeting message, beep, and record
The custom_answer_script is basically written in sh (script). Mine allows you to press a number based on who you want to leave a message for. And also allows you to press a button to stop the answerphone script, if it answers at the same time as you picking up the phone! The only thing I haven't worked out is how to stop the script if the caller hangs up... I end up with a short recording of the busy signal...
To Be Continued....
Re: The LUGs automated google message (which is sweet)
Although I have not installed anything yet, I wanted to add a post pointing others in the same direction I am moving in. I am attempting to find a telephone solution similar to Ovolabs Phlink http://www.ovolab.com/phlink/. Phlink is a very friendly, scriptable, telephone answering system. Unfortunently Phlink is Mac OS X only. However http://www.vocpsystem.com/ appears very similar, and will run on just about any *nix. I like the wiki, greetings from Tacoma, Washington and http://taclug.org.