Linux Hosting and a VM Answering Machine

. Saturday, November 3, 2007
  • Agregar a Technorati
  • Agregar a Del.icio.us
  • Agregar a DiggIt!
  • Agregar a Yahoo!
  • Agregar a Google
  • Agregar a Meneame
  • Agregar a Furl
  • Agregar a Reddit
  • Agregar a Magnolia
  • Agregar a Blinklist
  • Agregar a Blogmarks

Linux Hosting and a VM Answering Machine

Following these instructions should let you setup your Linux Host as an Answering Machine.

Please read the following HOWTO carefully and modify the lines where
needed. Be careful when working as root. Take care to make backup copies of any file before editing/changing it, so you can at least restore it back to the previous state in case something does not work.
The requirements

1. A Working Phone Line

2. A Modem working on a Linux Host
The modem should be a data-fax-voice modem
3. A Microphone ( To record the greeting message )

4. mgetty installed
Linux Hosting - Debian: you need to have mgetty and mgetty-voice packages
Linux Hosting - RedHat: you need to have mgetty+sendfax package installed
As a matter of fact you should have two files
they are
(i) vgetty ( in Debian /usr/sbin/vgetty and in RedHat /sbin/vgetty )
(ii) voice.conf ( /etc/voice.conf in both the distros )


Installation

Mgetty is available at it's Home Page

http://alpha.greenie.net/mgetty/

Vgetty Mirror Sites

http://www.coinet.com/~griz/vgetty
http://www.yeolde.com/~surfgriz/vgetty
http://www.okom.net/~vgetty
http://www.ciredata.com/~vgetty

1. Compile and install mgetty. See the instructions for mgetty how to do that.

2. Compile vgetty. There should be nothing special to do. Just type "make" from within the voice directory. If you managed to compile mgetty, you should be able to compile vgetty without any
problems.

3. Do "make install" as root from within the voice directory. Since you are always concerned about hackers, wanting to overtake your system, you will first do a "make -n install" to see all the evil things, the installation procedure will do.

Configuration

1.Copy the file voice.conf-dist to the same directory as all the mgetty config files. Rename it from voice.conf-dist to voice.conf. This file contain the description of the vgetty config option ... so read it.

So first see to it that you have the necessary files installed, I mean the vgetty executable and the vgetty configuration file voice.conf.

2.voice.conf most probably resides in /etc/mgetty or /etc/mgetty+sendfax

If you have installed vgetty from a tarball then the conf file
may be somewhere in /usr/local/lib or /usr/local/etc

In case you don't find the voice.conf file, then it must be there as
voice.conf.dist file in the /usr/doc/mgetty-* dir
copy it to /etc/*mgetty-dir* and start editing

Coming back to editing the voice.conf file, you need to edit three lines in the whole of the conf file

Now open voice.conf with your favourite editor ( I use vi ).

First search for the line

voice_devices

Change it to :- voice_devices your_modem_device

my config is as follows:
voice_devices ttyS1 /* ttyS1 is my modem's device ( My modem is on COM2 ) */

then search for the line

rings 5
or a similar line

Change this line to :- rings number_of_rings_after_which_you_want_the_modem_to_answer

I put this line to the default value of rings 5

so I have this line as
rings 5

then search for the line

port ttyS0
or a similar line

change this line to :- port your_modem_device

so I have the line

port ttyS1
in my configuration file

3. Ready for the recording Huh?

Please approach your nearest recording centre....
Ooops !! Sorry for the mistake !!

Record your greeting message. There are many ways to do that :

a.Using vm Linux Host:
Connect your microphone to the mic port of your modem
record your message with "vm record -m standard.rmd".
And record your message. The file is stored as standard.rmd
This can be done using internal microphone or local handset (type vm to see options)

b. Using an already recorded voice file :
you just have to convert your sound file in the modem expected format using the pvf
tools.
Eg : convert a voc file to Rockwell (compression type 4) format voctopvf file.voc |
pvftormd Rockwell 4 > standard.rmd

(Replace Rockwell by what you need type pvftormd -h for detail)

Be sure to make the voice_dir directories in the Linux host specified in your voice.conf file (e.g., /var/spool/voice,
/var/spool/voice/incoming and /var/spool/voice/messages).

Make sure you copy the file standard.rmd file /var/spool/voice/messages

4. Replace the invocation of mgetty in your /etc/inittab with vgetty if there is one. If there is no mgetty
invocation you just have to insert a line like that: "S1:345:respawn:/usr/local/sbin/vgetty ttyxx" in your
/etc/inittab file.
where ttyxx is your modem device and replace /usr/local/sbin/vgetty with the
proper path to vgetty like /sbin/vgetty or /usr/sbin/vgetty
(like that vgetty is running at runlevels 3 4 and 5 see inittab(5) man page for more)

5. With Linux Hosting, the vgetty logfiles are by default in /var/log/vgetty.ttyxx.log and the vm logfile is in /var/log/vm.log. Read these files if you have problems, they are quite readable and give you many hints, where the problem is. If you want to see more details in the logfile, increase the debug level in your voice.conf file to the highest possible value.

Using vgetty

Once you've rebooted vgetty is lauched at init and will answer incoming call. Incoming messages are
stored in receive_dir (see voice.conf)

1. playing incoming messages using Linux Hosting

Go to the incoming messages dir ( /var/spool/voice/incoming )

a. using vm :
play the message with "vm play -s file_name.rmd" (type vm to see options)
You can hear the message thro the speaker of your modem

b. using audio card and sox :
rmdtopvf file.rmd | pvfspeed -s 8000 | pvftobasic > /dev/audio (see rmdtopvf -h and rmdtopvf
-L for more)

0 comments: