This file came from the Caller ID FAQ at http://www.ainslie.org.uk/callerid.htm Subject: Re: Caller ID access? Author : omegatechware Email : omegatechware@home.com Date : 1998/11/10 Forums : comp.lang.basic.visual.misc On Sun, 08 Nov 1998 20:21:01 -0600, Marc Mitchell decided to enlighten us with : >Ok, > I know that you must have a third party control (well, that at least >the VB syntax won't handle port IO) to get access to ports. Can anyone >point me in the direction of where I could find information on getting >CallerID information from the modem? Any help would be greatly >appreciated. > > > >Marc > Marc, If you are using a 32 bit version of VB, you can use the MsComm control, which comes with (I believe) all versions of VB above Standard Edition. Assuming that you'll use the MsComm control : Set the port number Open the port Send the string "ATVCID=1" & Chr(13) to the port, which turns on Caller ID support. Check the incoming data for error messages If OK, wait for "RING" in the incoming data stream. Once "RING" has been detected, start to save the data stream to a string variable, not finishing until you're certain you've retrieved all of the ANI data in the stream. Caller ID services USUALLY send the ANI data between the second and third RING, but it is not a standard. Parse the string variable, looking for the following : "DATE=", "TIME=", "NMBR=", and for certain 'enhanced' services, "NAME=". Each field is separated from the others by either a chr(10) or a chr(13), or both. The order of the fields may vary. If you need to turn off Caller ID support, send "ATVCID=0" to the port. Don't forget to close the port before your application exits. After that, you should know what to do. If any of this information is incorrect, I apologize in advance. I'm taking this from memory, so bear with me. Alternatively, you can (and should) do some research into the various TAPI commands, which will allow you to run your app concurrently with other TAPI compliant programs, and not have to worry about the problems like "port already open", etc ... HTH, Jeremiah D. Seitz Omega Techware Solutions for small businesses http://members.home.net/omegatechware