Freebsd to dial phone number and

Freebsd to dail phone number and play a audio file. Is this possible?

I read this from: http://www.freebsd.org/doc/en/books/handbook/dialout.html

-----------------------------------------------------------
How Can I Dial a Phone Number on the Command Line?
Put what is called a “generic” entry in your /etc/remote file.

For example:

tip115200|Dial any phone number at 115200 bps:
:dv=/dev/cuad0:br#115200:at=hayes:pa=none:du:
tip57600|Dial any phone number at 57600 bps:
:dv=/dev/cuad0:br#57600:at=hayes:pa=none:du:
------------------------------------------------------------

I guess that explains it pretty clearly how to dial a phone number but how would I play a audio file?

I'm trying to create a simple alert system that calls me when I server goes down and plays a file (or says something somehow)

Any advice would be much appreciated. :)
 
Install simple command line player like mpg123:
#> cd /usr/ports/audio/mpg123 && make install clean && rehash
Put the playmusic line into some script, like:
mpg123 -q /home/alert.mp3 (-q option disables messages output to console)
To stop playing it is simple to kill process:
killall mpg123
To change volume from script use:
mixer vol 70:70

NOTE: Device file /dev/dsp must present and your sound card must be configured. mpg123 player has many other options and features, watch the man page.
 
Sorry, we actually can plug the phone line into modem port, and FreeBSD is able to make call? I never heard about it :S
 
To play music to the line you must plug soundcard output to the phone's microphone input through signal level converter, you can find many simple electrical schemes and circuits in the internet, good luck!
 
Do you have a voice modem?

With vgetty, modem::vgetty, and a little perl script it is fairly easy.

http://www.webreference.com/perl/tutorial/14/2.html

If you only have a regular modem, you are limited to good old numeric pages as far as I know. We used to have some complex coded messages.

You might be able to hack something out with VoIP but that is a lot of software (and possibly hardware). Another option is email. We have a system that sends emergency text messages via the carrier's email-to-text gateway to the on-call phone and uses regular email for casual alerts.
 
Back
Top