Xref: utzoo unix-pc.general:3013 comp.sys.att:6629 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!lll-winken!indri!pikes!udenva!isis!scicom!zebra!vern From: vern@zebra.UUCP (Vernon C. Hoxie) Newsgroups: unix-pc.general,comp.sys.att Subject: phone lines and obm Keywords: phtoggle(1), dial(3C), phone(7) Message-ID: <165@zebra.UUCP> Date: 5 Jun 89 01:06:36 GMT Distribution: na Organization: Alpha Science Computer Networks, Denver, Colo. Lines: 33 I am trying to put together a program which will be run by 'cron' and which will use the obm. When I detect that line 1 is set to VOICE, I want to switch it to DATA then carry on. I can use "system("/usr/bin/phtoggle"); except that when it detects and error, it throws up a window which needs a response. Not too good when run by 'cron'! o Is there a way to run "/usr/bin/phtoggle" so that I can get the error and handle it myself? o Is there some other mystical way to switch the phone line? (My interpretation of 'phone(7)' says that a 'struct updata' won't do it. If I'm wrong, please elucidate.) o What is a legitimate 'arg' for ioctl(2) when using the commands on phone(7) pg. 5? I have a 'struct updata' reflecting the call out parameters. The call: ioctl( fd, PIOCOFFHOOK. &my_updata); produces EFAULT (Bad address) perror messages sometimes then sometimes it goes off hook and dials the number. ??? I have tried using the 'dial(3C)' routine but got the following response from the compiler: undefined first referenced symbol in file tgetent //lib/libc.a tgetstr //lib/libc.a tgetnum //lib/libc.a o Apparently it needs another library but which one? o Is there an easy way to find out what functions are defined in a given library? Thanks for any help. -- Vernon C. Hoxie {ncar,nbires,boulder,isis}!scicom!zebra!vern 3975 W. 29th Ave. voice: 303-477-1780 Denver, Colo., 80212 uucp: 303-455-2670