And
the story behind callblocker. I needed to block phone calls from a
specific phone number based on the caller ID. I looked around, but
the solutions seemed to be about $100, so I decided to make my own (for
more than $100). Some of the features I wanted were:
- Allow most numbers, but have the ability to block most of an area
code
- Easy to configure- people with less technical experience might
want to change the blocking rules
- Connect to the internet for remote administration
- More complex interaction with hardware
I already had a Soekris net4501
around, so I designed my box around it. It has room for a low
profile 3.3V PCI card. These requirements were somewhat strict, so
I went with the first card I could find at a reasonable price, the AOpen FM56
PLX. Although the Linuxant
demo drivers only allow 14.4kbs connections, this is acceptable for an
interactive SSH connection.
With hardware on hand, I used sample caller ID code from
Device::Modem to start writing callblocker. I quickly learned that
the information is transmitted after the first ring. After seeing
that everything would work in theory, I began writing the callblocker
parsers.
The hardest and not yet complete part was determining how to deal
with blocking. There are a few approaches:
- Quickly pick up the phone, then hang it up
- Pick up the phone and act as a fax machine
My attempts at the former were unsuccessful. I tried three
approaches: ATA+++H, ATH1 ATH0, and voice mode.
The latter failed because either my modem or the drivers didn't support
voice mode. The first approach tries to establish a connection.
Setting register S7 to 1 sec reduces the time until hangup, but hangup
still takes some time to complete. The second approach picks also
takes too long to hang up. \
Sidenote: I recently read that AT! does what I want, but I
haven't investigated it yet.
As this was needed quickly, I decided hearing an annoying fax machine
like sound would be close enough to blocking the call. One
additional option was to use the general purpose IO on the net4501 (Linux
drivers) to control a relay that can disconnect a connected phone
from the line. The wiring would be very simple, as would the
implementation.
|