Alternative call waiting service with Perl


Article from Issue 74/2007

If you can’t get through to your home number, a script can check the line status and send a signal to you via the Web to tell you when the line is free.

You’re trying to call home, but somebody is hogging the line. Of course, you could always ask your telco to enable call waiting. The service lets marathon phone users know that a call is waiting by beeping every couple of seconds. On the other hand, the service costs money, and the beep can get on your nerves. This is what prompted me to buy a small phone amplifier, and put together a handy application. The Smart Phone Recorder Control grabs the signal off the phone line and feeds it to the sound card in my Linux computer. Linux can access the signal via the /dev/dsp device, and the Perl Audio::DSP module from CPAN will read it. The script uses a couple of heuristic tricks to determine whether the line is busy, and if so, it keeps on trying until the line is free, before notifying the user via a hidden CGI script on a website.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perl: PerlPanel

    One panel has a neat collection of applets and another has spectacular looks – but a combination of the two is rare. Now help draws nigh for the desktop: PerlPanel is extensible with do-it-yourself widgets.

  • Perl: Dynamic netstat

    The netstat utility reveals how your Linux box interacts with the local network. With a few Perl modules, you can develop a tool that displays the data dynamically, exactly the way top does.

  • Perl: Ptrace

    Linux lets users watch the kernel at work with a little help from Ptrace, a tool that both debuggers and malicious process kidnappers use. A CPAN module introduces this technology to Perl and, if this is not enough, C extensions add functionality.

  • Perl: Skydiving Simulation

    Computer game programmers apply physical formulas and special tricks to create realistic animations. Simple DirectMedia Layer (SDL), which is available as a Perl wrapper, provides a powerful framework for creating simple 2D worlds with just a couple of lines of code.

  • Perl: X10 Module

    My low-budget router has just crashed, and there is no way to reset the beast remotely via a network. Never fear – an X10 module, controlled by a web GUI with an Ajax interface, can actuate the mains switch.

comments powered by Disqus

Direct Download

Read full article as PDF:

Perl_Call_Waiting.pdf  (224.86 kB)


njobs Europe
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia