Previous section   Next section

Hack 43 Caller ID on Your TV

figs/beginner.giffigs/hack43.gif

Only a chosen few are allowed to interrupt your favorite television show, TiVo or no. Find out who's calling without averting your eyes from the tube.

The hero and the heroine are about to kiss. The identity of the spy is mere seconds from being revealed. The fate of a major character on the show hangs in the balance. And the blasted phone rings. You could pause the program, but this is a seminal moment in television history. You could ignore the phone, but you are expecting a call about that job you were after. What to do?

If you have caller ID from your phone company and a DirecTiVo (combination DirecTV satellite and TiVo system), then you have just the combination you need to determine whether or not to reach for that phone.

I'm afraid this hack isn't going to magically give you caller ID if you haven't requested and paid your phone company for it. We're assuming you've caller ID on the phone line into which your DirecTiVo unit is plugged.

Greg Gardner's elseed (http://www.bah.org/~greg/tivo/) displays caller ID information�recognized by your DirecTiVo through its connection to the phone line�and puts it up on your television screen for you to see. Figure 3-10 shows elseed in action.

Figure 3-10. Caller ID on an incoming call, captured by elseed on TiVo and displayed on a television screen
figs/tivo_0310.gif

Download the archive, extract the elseed binary, copy it [Hack #36] to /var/hack/bin on your DirecTiVo, and set it as executable:

bash-2.02# chmod 755 /var/hack/bin/elseed

Give it a whirl by invoking it on the command line by hand:

bash-2.02# elseed -e

This will wait until the first phone call with caller ID comes in, pop the number up on the television, and then exit. So, pick up that cell phone, dial the line to which your DirecTiVo is hooked, and watch for your number to appear on the television screen.

Assuming that worked as expected, set up elseed to run automatically whenever your DirecTiVo boots. Transfer the elseed_forever.sh script from the elseed archive on your PC over to /var/hack/bin, and use the vi [Hack #39] to append the following lines to your /etc/rc.d/rc.sysinit file:

sleep 200
/var/hack/bin/elseed_forever.sh &

Or, use the echo command, like so:

bash-2.02# remount -o remount,rw /
bash-2.02# echo "sleep 20; /var/hack/bin/elseed_forever.sh &">> /.profile
bash-2.02# remount -o remount,ro /

However you choose to edit /.profile, remount the / partition read-write, then read-only again when you are finished, as shown in the preceding command.

Now this works just fine, displaying the telephone number and available caller information with each incoming call, but what if you want to override the information that comes from the phone company? What if, instead of her actual name, a call from your significant other could show up as "Teddy Bear" or whatever cute nickname you use? What if the phone company has nothing useful on record associated with your best friend's number?

elseed is configurable via an elseed.conf file. containing lines like these:

6175555555 A BOGUS NUMBER
5105555432 Teddy Bear
7075551234 Mom

Each of these lines associates a particular phone number�it must be a 10-digit number�with a name or bit of arbitrary text to display.

Make yourself a /var/hack/etc directory in which to save the elseed.conf configuration file:

bash-2.02# mkdir /var/hack/etc

To have elseed pay attention to the configuration file, it has to be invoked slightly differently. Reedit your rc.sysinit file, changing the line:

/var/hack/bin/elseed_forever.sh &

to:

/var/hack/bin/elseed_forever.sh -c /var/hack/etc/elseed.conf

Turn your TiVo off and back on again for TiVo to launch elseed automatically, or start it by hand (if it's not already running) by typing the following invocation on the command line:

bash-2.02# elseed_forever.sh -c /var/hack/etc/elseed.conf &

  Previous section   Next section
Top