Using Mscomm how can I detect a busy signal or that it is ringing?
THanks
Santiago
Printable View
Using Mscomm how can I detect a busy signal or that it is ringing?
THanks
Santiago
try this:
Private Sub MSComm_OnComm ()
Select Case MSComm1.CommEvent
' Handle each event or error by placing
' code below each case statement
' Errors
Case comEventBreak ' A Break was received.
Case comEventFrame ' Framing Error
Case comEventOverrun ' Data Lost.
Case comEventRxOver ' Receive buffer overflow.
Case comEventRxParity ' Parity Error.
Case comEventTxFull ' Transmit buffer full.
Case comEventDCB ' Unexpected error retrieving DCB]
' Events
Case comEvCD ' Change in the CD line.
Case comEvCTS ' Change in the CTS line.
Case comEvDSR ' Change in the DSR line.
Case comEvRing ' Change in the Ring Indicator.
Case comEvReceive ' Received RThreshold # of
' chars.
Case comEvSend ' There are SThreshold number of
' characters in the transmit
' buffer.
Case comEvEof ' An EOF charater was found in
' the input stream
End Select
End Sub
I am assuming you have amodem tied in here to the Com Port.
When you open the port and dial the number, the modem will send back a text string saying "BUSY" you can trap for that for checking for busy signal.
It works the same way if the phone is ringing. A text "RING" will com in from the modem and you can take the appropriate action here.
Othere than having direct access to the hardware, this is the only way I know of to monitor the Busy signal and whether the phone is ringing.
Jerel