Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!cbnewsc!guy From: guy@cbnewsc.att.com (guy.r.berentsen) Newsgroups: comp.sys.3b1 Subject: Re: How to detect phone ring? Summary: Trap SIGPHONE Message-ID: <1991May14.171345.3747@cbnewsc.att.com> Date: 14 May 91 17:13:45 GMT References: <545@trux.UUCP> Distribution: na Organization: AT&T Bell Laboratories Lines: 15 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