This file contains the conversation which is to be carried out with the local modem (and though it, the Enterprise server). The conversation is actually run by a program called chat.
The conversation script is stored in /etc/ppp/ppp.chat, but it is used both by PPP and by diald.
Although your browser may format it, I have the entire conversation on one line:
ABORT BUSY ABORT 'NO CARRIER' '' AT OK-AT-OK AT\&F\&D0\&B1\&H1\&R2\&C1\&D2 OK ATDT0345678666 CONNECT '' ogin: \qusername word: \qpassword
The two ABORT commands tell chat to abort the connection if Enterprise's phone is busy or if there is no carrier. The rest of the script is a series of send/expect pairs. We send something to the modem and wait till the expected string is received back.
We start off by sending an 'AT', to which the modem should reply 'OK'. If we don't get that response, we try 'AT' again. If we still don't get 'OK', we give up: the modem is turned off or disconnected or broken.
Next we send an initialisation string to the modem, and expect it to reply 'OK'. (The actual initialisation you send depends on your modem. I'm using a US Robotics Sportster 14,400.)
After that, we tell it to dial Enterprise's number; when it sees the string 'CONNECT', it will send nothing, but will expect to see 'ogin', which is the end of the log-in prompt. We send our username and wait for the password prompt. Finally, we send our password.
The \q before username and password ensures that they are not echoed in your log files. This improves security.
If the expected response is not received, chat terminates after a timeout
period, and pppd (or diald) exits.