Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect Busy Signal 1

Status
Not open for further replies.

mjk9564

Programmer
Apr 23, 2003
64
US
Does anyone know how you can detect a busy signal with an mscomm control or of another control you can use in VB to make phone calls and detect busies? I haven't used the comm control to often, but I believe this should be possible with it.
 
I'm going to guess that you'll find lot's of example at do a search for something like 'phone' 'dial' 'MSCOMM'. I would probably dial a number that I know is busy and see what the modem returns.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
I thought the modems generally detect it. If you have results turned on, it should return BUSY. So, you can keep looping to see if it returns the result code BUSY. There are also numeric result codes, but I do not know what they are. I'll see if I can find the proper init string to send to most modems to tell it to return string results.
 
I got the busy word off the input buffer. Is there a generic init string anyone knows to get the modem to disconnect immediatly once I get the busy signal. When I close the port it still goes for a couple seconds sometimes, is that the way it is supposed to be.

 
I believe that is usually what happens. You might be able to send an +++ATH command to the modem as soon as you see the busy to tell it to hang up. Let me know if that works.
 
ATH0 Seems to work for my modem. I might try it on a couple others thanks for the help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top