procedure AutoAnswer;
Prepares the modem to answer a call after a specified number of rings.
After AutoAnswer sets the appropriate variables and triggers, control returns to the program and the modem component watches for incoming calls in the background. After the specified number of "RING" responses are received from the modem, the call is answered. If StatusDisplay is assigned to a TApxAbstractModemStatus component, that status dialog is displayed during an answer attempt.
Once the "RING" response is received, the ModemState changes from msAutoAnswerBackground to msAutoAnswerWait. ModemState remains in msAutoAnswerWait until AnswerOnRing "RING" responses are received, when ModemState enters the msAnswerWait state and the call is answered. When a connection is established, ModemState changes to msConnected and the OnModemConnect event is generated.
Auto answer mode can be cancelled by calling CancelCall. The auto answer mode is cancelled regardless of whether the TApxModem is waiting in the background for the incoming call or the modem is currently answering the call.
Calling AutoAnswer does not turn on the auto answer (AA) light on an external modem. The AutoAnswer method does not use the auto answer feature of the modem.
See also: CancelCall, ModemState, OnModemCallerID, OnModemConnect, OnModemFail, StatusDisplay