Description-
Dials the specified telephone number. It is assumed that a Hayes compatible modem is being used. This function forces the modem back to the command state and then dials.
Syntax-
stat = Dial(port,mode,telephone);
On Entry-
int port;
Port previously opened with InitializePort() or OpenComPort().
int mode;
0 Pulse dialing.
1 Tone dialing.
char far *telephone;
String with telephone number.
On Exit-
int stat;
0 If the telephone number successfully dialed.
else
-1 if the modem did not respond or the port was not initialized.
See Also-
ModemAnswerMode()
ModemAttention()
ModemConnect()
ModemHangup()
ModemModifyString()
Example-
#include "comm.h"
int stat; int port=0; int mode=1; char *telephone="1-713-568-6401";
if ((stat = Dial(port,mode,telephone)) == -1) { printf("Modem not responding\n");
/* Take corrective action */ }