How to detect phone ring?

guy.r.berentsen guy at cbnewsc.att.com
Wed May 15 03:13:45 AEST 1991


You can use signal(2) to trap SIGPHONE, and execute a function that 
calls ioctl(2) (see also ph(7)) to check the status of the phone line.

To do this you have to open the phone line device file, (/dev/ph1 or /dev/ph0)
which means that if you use the phone manager, 
the phone manager may not have that line defined (file open) while 
your daemon is running. 

If you are using the phone manager, you can check your history
list for the info you want on all answered calls, but I don't think the phone
manager records unanswered calls.

Guy Berentsen
att!ihlpf!guy



More information about the Comp.sys.3b1 mailing list