LinuxNetMag
ISDN Answering Machine
List | Home
TOC
   
LinuxNetMag #2

  Software
 MP3
Player
Encoder
Ripper
IDE
 Games
QuakeII: XQF, MODs
Action: Maelstrom, bzflag
Development
 Applications
Windowmaker/Gnome
TkBrief
  
 

Network

suck news
ISDN answering machine
Fetchmail
ICQ-Clients
recommended links
  
 

Hardware

Zip Drive
SANE - scanning
  
 

Editorial Office

Editorial
Guestbook
Mailing-Liste
List of articles



printer-version


  Telefon If you own an ISDN-card you often will be angry about the fact that you are not able to use it as a facsimile.
At least it functions as an answering machine.
This small but useful helper is configured without problems just in a couple of jiffy's.
... a message after the tone ...
If the PC is turned on anyway the whole day without a present user it makes sense to use the PC as an answering machine. This kind of answering machine offers many advantages due to the many configuration possibilities. ISDN submits the telephone number of your opponent and it is easy to read out this number and create a special message for every caller. Even not wanted callers can be excluded and do not trash your disk space.
Also it is possible to configure it using the internet if you want (look IX 02/1997, german). But we do not want to go that far. Just the necessary first steps are discussed in this text. This configuration was tested on S.u.S.E (6.0) but it should work with other distributions, too.
 
Vbox answers

If you have a working ISDN System with Linux, that means you have always dialed into the internet with ISDN, vbox should already be installed because this program is included in the i4l (ISDN for Linux) rpm packet (S.u.S.E. 6.0). Vbox is an ISDN-version of mgetty that offers an answering machine for analog modems. The main part of vbox is the program vboxgetty which is placed at /usr/sbin/vboxgetty . This program administrates the incoming calls and safes the recorded messages. First you should find out which device talks to your answering machine. As the "user" root you should try to start it with

>> /usr/sbin/vboxgetty -d /dev/ttyI0
If the program starts without an error message you should look at the output of vboxgetty. You find it at 
/var/log/vbox/vboxgetty-ttyI0.log
In this file you should find something similar to
 
File /var/log/vbox/vboxgetty-ttyI0.log (reduced)
--------[Begin session]--------
Running vbox version 2.0.0 BETA 5...
Tcl interpreter version 8.0...
Found command 'debuglevel = FEWIDJ' (-global-)...
Found command 'modeminit = ATZ&B512&E5' (-global-)...
Found command 'user = ronny' (-global-)...

[...]

Locking modem port (/var/lock/LCK..ttyI0)...
Setting "/var/lock/LCK..ttyI6" to 506.100 (0644)...
Drop permissions to userid 506; groupid 100...
Initializing modem port (voice mode; 2500 ms)...
Hangup modem (drop dtr 400 ms)...
Flushing modem (timeout)...
Reading modem echo (4 secs timeout)...
Reading modem input (4 secs timeout)...
Waiting for "OK"... Got it.
Flushing modem...
Waiting...

Then vboxgetty started correctly. Now you can call yourself for a test (with ISDN this does not make a problem --- just call your card from the second number) and see how vboxgetty reacts. First you should look at the log-file of vboxgetty with 

>> tail -f /var/log/vbox/vboxgetty-ttyI0.log
and also the local log-file with 
>> tail -f /var/log/messages
Does vboxgetty react to your call it should be visible at once in the vboxgetty log-file and you see something similar to 
 
File /var/log/vbox/vboxgetty-ttyI0.log (reduced)
[ 1/ 6] CALLER NUMBER: 3495252XXXX (*** Unbekannt ***)...
Reading modem input (6 secs timeout)...
[ 2/ 6] RING...
Reading modem input (6 secs timeout)...
 [ 3/ 6] RING...
 Reading modem input (6 secs timeout)...
[ 4/ 6] RING...
 Reading modem input (6 secs timeout)...
 [ 5/ 6] RING...
Reading modem input (6 secs timeout)...
 [ 6/ 6] RING...

If this log file does not change the output of /var/log/messages may help.

A possible error is the closed dial-in in your own system. You are able to turn it off using yast at 

Administration des Systems ->  Network configuration ->  ISDN-Parameter configuration
There you find two points
  • Numbers which may dial-in
  • Just entered numbers are allowed to dial-in
The first field should be kept free and the second box should not be activated.
If vboxgetty still does not react it will be possible that you use a wrong device. You should try all available devices/dev/ttyI# starting with 0, and call yourself every time while you watch at the log-files. (Attention: See at the log files of the corresponding device and not any longer at vboxgetty-ttyI0.log) Usual this is the fault.
If you find the right device and the answering machine reacts vbox will receive you with a default message. 

Now the fit of some configuration files will follow. Easy to use is the S.u.S.E. program SuSEvboxConf which has to be started as root. This program leads you through the next steps of the configuration.

This was the biggest part, now some small work will follow.
 

Start automatically

To start the answering machine automatically with every boot you may use an entry in the file /etc/inittab . There you should add the command

I0:23:respawn:/usr/sbin/vboxgetty -d /dev/ttyI0
Of course you use your device which reacts with vboxgetty. (Sure, you are able to initialize the start with an Init script but the inittab is not that complicated.)
Also you need an entry into the file /etc/initd.conf .
Here you add
vboxd   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/sbin/vboxd
Now, the answering machine will be started with every boot (you would not need to restart Linux, if you wanted to test it. Enter init 1 and after reaching the singel-user-mode an init 2 do the same)
 
Specialties

Now we fit the configuration file to our own wishes. The user who wants to use the answering machine should create a subdirectory in /var/spool/vbox with his/her name.
For example the user frank5 creates

>> mkdir /var/spool/vbox/frank5
In this directory you copy the default configuration files which are available at /usr/doc/packages/i4l/vbox/examples . You need the files vbox.conf and (important!!!) standard.tcl . Additional you need a directory for your messages and on for the incoming messages.

The incoming messages are stored at

/var/spool/vbox/frank5/incoming
Your messages at
/var/spool/vbox/frank5/messages
As a normal user (not root) you are now able to hear the recorded messages with SuSEvbox. The easiest way to record your messages is the following. Call yourself and speak your message to vbox, than move the file to the folder messages and change the name.
To use a special message for special callers you use the vbox.conf . You are able to configure it with SuSEVbox but this is the more complicated way. Use a word processor to open the file and you will see that this one explains itself.

The script standard.tcl handles the incoming messages and sends a mail to the user if you got a message. With biff or any other mail monitor you can keep an eye on the answering machine.
Here are two configuration files. A special comment is that the default standard.tcl does not work with any systems

At the end some hints:
The signal tone between your and the incoming message should be long, otherwise it will changed into a very short crack.
In older S.u.S.E. distributions they forgot to include some converting tools like pvftools which are constructed to play and convert the message files. But you can help yourself with the following two scripts
  • susevboxplay, was changed and does not need pvttools. One problem: you are not able to change the volume.
  • playau to play .au-files


 
Links
vbox ftp://ftp.franken.de/pub/isdn4linux/contributions/
ISDN  http://www.muc.de/~hm/linux/linux-isdn.html
 
print
Other issues of Linux NetMag
[ #1 | #2 | #3 | Main ]