|
|
Click here for more information about <topic>.
Development
Environment Technical Information
|
|||||||||||||||||||||||||||||||||
Requirements |
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
Using This Sample Program |
|||||||||||||||||||||||||||||||||
|
Data modems do a good job of detecting when a dial tone is NOT present. However they are not consistent at reporting when a dial tone IS detected. When a Dial Tone is NOT Present
When a Dial Tone IS Present
|
|||||||||||||||||||||||||||||||||
Download this Sample Program |
|||||||||||||||||||||||||||||||||
For Use TeleTools v3.7
|
|||||||||||||||||||||||||||||||||
How this Sample Program Works |
|||||||||||||||||||||||||||||||||
|
We use the etLine.DeviceList property to automatically populate the device combobox with the list of available TAPI devices on your machine. In the ComboBoxDevice click event, the etLine.DeviceName property is set to your selected device to the name selected in the combobox. We then use the etLine.TAPITSP property to see the text of the name of the TSP associate with this device and look to see if it contains the word "modem". If true, we then use the etLine.DeviceMediaModesAvailable property to check the flags set by the modem's INF file. A datamodem will set the flags for LINEMEDIAMODE_INTERACTIVEVOICE and LINEMEDIAMODE_DATAMODEM, while a voicemodem will also set the flags for LINEMEDIAMODE_UNKNOWN and LINEMEDIAMODE_AUTOMATEDVOICE. We put the code for all of this into two simple functions, IsVoiceModem and IsOnlyDataModem. If this is a datamodem, then we allow you to dial, if not, then we report that this device is either a voicemodem or something else. If this is a voicemodem, we display a box asking you to download the etVoiceModemDialTone sample program instead. If your device is a datamodem, we then set the etLine1.DeviceActive property to True and make sure the device activates without an error. TeleTools then activates the "Dial Tone?" button so that you can press it to test for dialtone. We set etLine1.CallPhoneNumber = "W" which tells the datamodem to wait for a dialtone and execute the etLine1.CallDial method to dial the phone. Since datamodems fire the etLine_Onconnected event as soon as the dial string is sent, we place code in the etLine1_OnConnected event to notify the user that dialtone was detected and then call the etLine1.CallHangup method by accessing CommandHangup_Click. In the On_Disconnected event we also check the etLine1.CallDisconnectMode property to see if it was "O" or LINEDISCONNECTMODE_NORMAL and if so display that dialtone was detected. If the etLine1.CallDisconnectMode = LINEDISCONNECTMODE_NODIALTONE then we display that dialtone was NOT detected. If these tests are inconclusive we report that your modem has not reported dialtone correctly and display what message is sent. It is not safe to check for dial tone with every telephone call. We suggest that you offer it as an option to your users as a diagnostic tool or perform a test when the program starts.
|
|||||||||||||||||||||||||||||||||
Release Notes |
|||||||||||||||||||||||||||||||||
April 30, 2003Published |
|||||||||||||||||||||||||||||||||
|
|
||||
|
||||