
Riportiamo nel seguito un estratto dal “README” di questo non più recente ma ancora utile progetto di Angelo Haritsis tuttora disponibile nei repository ufficiali di Ubuntu.
sudo apt-get install xringd
How about having your home computer connect to your office or your provider, turn the air-conditioner on/off or activate _any_ command when you are not at home? Simple, you would say. Well, imagine now that your home modem does not have voice/DTMF-capabilities and you can use no modem to dialup your home. The only thing you have is a common telephone.
Furthermore (even if you DO have a modem), you might wish your home computer to execute a choice of different commands _without_ its modem going off hook (consequently not paying for any connection).
xringd, the Extended Ring Daemon can do it for you. And a bit more.
It will monitor the serial line for RING signals and activate commands if specific “ring-delay sequences” are probed.
How do you actually signal your linux machine to execute different commands?
You just make it receive rings and delays between them that follow specific patterns (as defined in a configuration file). Different patterns activate different commands. For example: Produce a single ring, wait from 10-25 seonds, produce another single ring. If no rings appear after this for 30 seconds your linux pc starts up a connection with your office!
Ecco un xringd.conf di esempio: https://www.apt-browse.org/browse/ubuntu/trusty/universe/amd64/xringd/1....
It will also allow you to execute a command per ring probed. This allows you to replace your boring phoneset rings with sounds from your sound card or even with messages displayed on screens on machine(s) on your network!
Ricordiamo che gli utenti Ubuntu possono trovare qualche effetto sonoro nei pacchetti sound-theme-freedesktop
e ubuntu-sounds
.
Per esempio sound-theme-freedesktop
contiene, tra gli altri, il file /usr/share/sounds/freedesktop/stereo/phone-incoming-call.oga
e ubuntu-sounds
contiene /usr/share/sounds/ubuntu/stereo/phone-incoming-call.ogg
.
Nota: At the moment, xringd is device dependent on Linux kernel 1.3.48+ and serial devices that support the TIOCMIWAIT, TIOCGICOUNT ioctl(2) calls. These were added by the same author to the Linux kernel so that a process can wait on a modem DCD,RI,DSR,CTS change on a serial port and can also read a kernel count of the interrupts on each one of these 4 lines. RI was used for this program. (Other possibilities exist in using this ioctl for instrumentation projects.) Note that these ioctls are only implemented for 16xx0 uarts now (Jan96).
In assenza di hardware compatibile il comando xringd -d
fallirà stampando il messaggio seguente:
xringd: needs Linux 1.3.48+, 16xx0 uart xringd version 1.20 - by A. Haritsis (ah@doc.ic.ac.uk) usage: xringd [-a rngcmd] [-c cfgfile] [-d] [-h] [-i ignore_msec] [-l loglevel] [-m modem_dev] [-e] [-n] [-t initime] [modem_dev]