Auffie’s Random Thoughts

Thursday, May 28, 2009

Watchdog for asterisk

I've been mulling over designing a watchdog circuit for my asterisk (open-source telephony) process that runs on my linux server. My current safety mechanism consists of a relay that connects a vanilla telephone directly to the POTS line in the event of a power failure. However, if the operating system crashes, there is no way to switch the relay automatically as in the case of power failure.

There are several ports out of my old linux box that I can use to communicate to the outside world: a RS-232 serial port and a couple of USB ports. The RS-232 serial port is taken by the UPS, so it's out of consideration. USB is too complex and probably requires some expensive parts just to get started (cf. this article on linuxfocus.org).

There is another possibility: the sound card. Since the server doesn't care for outputting music or other sounds, I can program a watchdog process to monitor asterisk and output a tone, say every minute. If the operating system crashes, there will be no such notification tones. A timer circuit can then turn on the relay to enable the vanilla telephone.

I'll need a LM567 (or equivalent) tone decoder and a 555 timer for this purpose. A simple 567 circuit is found here. The timing function can be implemented by this circuit using a 555. To generate the tones through the sound card, this is probably the way to go.

Will update when I actually construct the circuit and make it work.

UPDATE 2009-06-01: Don't forget a flyback diode (1N4148?) across the relay!

UPDATE 2009-06-05: NightFire Electronic Kits looks like a good place to get the parts I need.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home