Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect dial tone and dial a phone number
Message
From
14/01/2001 10:04:39
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00463505
Message ID:
00463512
Views:
11
>Hello and thanks in advance;
>I'd like to know how to detect dial tone before dialing a phone number in foxpro using the Comm port.

There's no completely generic mechanism; the general approach of opening the Comm port, sending an "ATD" string and receiving back a status code which you interpret applies to most Hayes command set compatible modems, but the responses are not uniform across models. Most current models will actually allow you to send a dial command to the modem and will respond with a distinct response if no dial tone is seen; you need to check the documentation for your modem to find out what the modem returns on a no dial tone seen condition.

Since you're interested in telephony-related operations rather than low-level serial device control, you'd be better off investing in a TAPI control that handles the telephony device at a higher level than typical of the MSCOMM32 control, which is a low-level serial port interface; MSCOMM32 has no native concept of 'modem', 'dial tone', etc and requires you to program the behavior and trap the responses and interpret them yourself. Unfortunately, TAPI products are not free; while there are API calls you can use to perform most TAPI operations, purchasing a third-party TAPI-compliant ActiveX control is likely to be the most cost-effective solution, especially if a variety of different modem hardware is being used.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform