Computing.Net > Forums > Programming > Caller Idea

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Caller Idea

Reply to Message Icon

Name: BaBa
Date: July 27, 2002 at 09:22:41 Pacific
Comment:

Hi,
I would like to know the code on how to create a caller idea using VB6.
anything is appreciated



Sponsored Link
Ads by Google

Response Number 1
Name:  
Date: July 27, 2002 at 16:30:03 Pacific
Reply:

I don't know if this is what your looking for, but it might be an interesting read:

http://www.yes-tele.com/modem.html


0

Response Number 2
Name: Jim
Date: July 27, 2002 at 18:10:30 Pacific
Reply:

Usually, when you buy a modem with Caller ID functionality, they ship it with a program that will take advantage of that functionality. If not, there are probably several ways of getting to the information. I'm not really sure how to handle your particular situation, if you have to have the Caller ID work and have it transfer data, too. It may depend on your particular brand of modem.

I'll tell you what I did with mine and how I got it to work. I'm the only employee in my office, and I travel periodically for work. I don't have a secretary to take messages for me, but I do have a beeper. I wanted to make a program that would suck the calling number from any incoming calls, and send me a beeper message with that number and any name identifier on it. Then I could decide whether I wanted to return the phone call from wherever I happened to be. I have two phone lines in my office, so I installed my Caller ID modem on line one, and another modem in another computer on line two to make the call to my beeper company. Whenever I left the office, I executed my "CallID" program, which simply monitored line one for any incoming calls, and if it got one it sent a local area network (ethernet) message to the computer on line two, which dialed my beeper company and sent me the information.

The CallID program was pretty simple. All I had to do was send the caller ID enable init string to the modem, and then wait for it to send me data. The Caller ID init string for this particular modem I found deep in the reference manual, and it was "AT #CC3" followed by a carriage return newline sequence. Your caller ID enable init string will depend on your particular modem. If you don't have the reference manual, you may be able to find it on line. Here's how to do it in VB:

1) Open the COM port that your modem is on, with CreateFile. Your Filename will be "COM2" if you're using com2. Desired access is GENERIC_READ + GENERIC_WRITE. Use OPEN_EXISTING, and FILE_ATTRIBUTE_NORMAL. All other parameters are 0.

2) Call GetCommState on that File Handle.

3) Change the Baud rate. I used 38400.

4) Call SetCommState with the new data.

5) Use WriteFile to send the init string. To check and make sure this it working, try a dummy init string of "ATDT 12345" CR LF, and see if it dials out. If so, you can be pretty sure you're working to this point.

6) Use ReadFile to pick up the incoming data. You'll have to parse the data, and it will be in a format possibly unique to your particular brand of modem, but it'll be easy to figure out. Mine gave a one byte code (which I largely ignored) followed by several ASCII fields. Time and date string, source number, and text owner of the number if known.

At that point, you can do about whatever you want with the data. However, you have the com port tied up, so receiving data may or may not be easy with this modem. If you have another modem, you could hook them both up and just have this one not answer, and pull off the Caller ID info, and have the other one actually do the data transfers.

Are you really sure you want to do this? It seems like it would be easier to read the number off your caller ID box.


0

Response Number 3
Name: BaBa
Date: July 27, 2002 at 21:53:41 Pacific
Reply:

Hi guys,

A big THANK for the help guys. I was completely in the dark. I did not know how to start. Now I think I got enough ideas to give me a leg up.
Thanks to you guys. You guys are great!!!!

BaBa


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Caller Idea

Capture a telephone number www.computing.net/answers/programming/capture-a-telephone-number/2611.html

Transfer files between UNIX and MF www.computing.net/answers/programming/transfer-files-between-unix-and-mf/17792.html

Need programming ideas www.computing.net/answers/programming/need-programming-ideas/10230.html