Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got an interesting one for you. I've been going over my server monitoring and notification systems (Nagios based), and realized that if our internet connection goes down, there's no way for it to notify me. I already have a modem listening (Via CentOS 5) on a spare POTS line so that I can dial-in in case our internet goes down. I was wondering if I could come up with a script (Shell, Python, etc) that can dial out and play a recorded message (wave file I'm guessing) when it's picked up. I know Windows supports voice calls over a voice modem, I was wondering if a solution existed for Linux...

I know asterisk can probably do it, but isn't that overkill (A full blown VOIP system just for a notification mechanism that will hopefully never be used)? And wouldn't it interfere with the modem's primary function as a backup network interface (PPP spawned via mgetty)?

I've done some searching, and haven't really come up with much. I know how to dial out from the command line, but only as a modem (not as voice). Worst case, I could set it up to dial out as a modem, and then just realize that if I get a call with modem sounds from that number that it's the notification... Any insight would be appreciated...

share|improve this question
    
just wondering if you ever got it to work properly. I am looking at setting up exactly the same thing - a dialer for server monitoring. In my situation, I cannot (not do no want to) use SMS; I need an actual phone call. –  user56550 Oct 8 '10 at 13:24
    
Well, yes and no. I got it to work on a normal voice modem, but the system that I needed it on only had a win-voice modem. The drivers that were available didn't support voice operations, and the company wanted like $50 for the full driver. So rather than buying a new modem, I just implemented another method. But it is possible (and quite easy, as long as you have the drivers)... –  ircmaxell Oct 8 '10 at 15:25

4 Answers 4

up vote 1 down vote accepted

Linux uses vgetty for voice data over a modem (mostly as an answering machine). It looks like there's a perl module over at CPAN that comes with an example script like what you want.

Callme script

In the examples subdirectory of the source distribution there is a callme.pl script. This dials the given number and plays the given message. Use the following command to run it:

    vm shell -S /usr/bin/perl callme.pl <number> <message>.rmd
share|improve this answer
    
So far looks good. But I'm having a hell of a time getting it to work. It's dialing out fine, but the second it goes to play the .rmd file, it hangs up... I've been watching the logs, and I'm not sure where to go from here, I guess I'll just keep permuting until I find something that works... Thanks! –  ircmaxell Jun 18 '10 at 19:18
    
package is called libmodem-vgetty-perl on Ubuntu –  Janus Troelsen Feb 3 '13 at 23:26

I use an external server for running an additional instance of Nagios, which is a last resort notification in case of complete failure.

I wish I had an answer for your modem audio playback question. I want to say it should be simple but my knowledge of that stuff is getting rusty. There used to be Voice Modems sold specifically for playback of audio.

If I were you, I would be trying to redirect audio playback using console software. I'd think this could be very simple. I might research more later when I have a moment.

share|improve this answer

I found this during a quick search:

share|improve this answer

If you had a dial-up internet account, it could connect to the internet send a text via e-mail then disconnect.

share|improve this answer
    
Sure, but that would require getting (and paying for) a dial up account... It's an option, but unless there's some free service I don't think I could justify it (when a dial out is free)... Thanks tho... –  ircmaxell Jun 17 '10 at 20:23
1  
@ircmaxell: Actually a lot of cell providers will give you a free backup dial-up account if you have a data plan in one of the top 2 tiers of service (I know Verizon does this for their "unlimited" data plans) –  Zypher Jun 17 '10 at 23:44
    
Or you could try netzero, free for 10 hours/month, if you use more than 10 hours in a month, you have bigger problems. netzero.net/start/landing.do?page=www/free/index –  BillN Jun 18 '10 at 15:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.