## SafeFire PPP

### v1.0

# Dialing Scripts

There is an internal dialer in SafeFire PPP. It has 3 working modes

Working mode can be set using port.script.mode configuration variables that has three possible values:

- DIAL

  In DIAL mode there are two dialing phases:

  1. Dialing.
     - First SafeFire PPP initializes modem (using setting from port.modem.init. Default value is "ATZ")
     - Then it sends dial command to modem and waits for "CONNECT".
       Dial command is composed using two variables:
       - port.modem.dial as dialing prefix
       - port.phones as dialing numbers list. Numbers in list are separated by spaces
  2. Script.
     When connection is established SafeFire PPP executes ISP-depended script taken from port.script variable. Format of script is the same as in SLATTACH mode.
- SLATTACH

  SLATTACH mode script is taken from the port.script configuration variable. It consists of send - receive commands separated by spaces. The first command is send command.

  > Example:
  > `port.script=ATZ OK ATDP1234567 CONNECT ogin: \U sword: \P`
  > For dial mode this script can be shortened to:
  > `port.script=\c ogin: \U sword: \P`

  For details about special characters see special characters below

- REXX

  In REXX mode you must specify REXX script file name in port.script variable. Script files must have .CMD extension. Format of script files is similar to OS/2 standard PPP.EXE script files format and you can use any script file supplied with OS/2 or created by third party.

### Escape sequences

Each send command is send as CR-terminated line. It may contain sequences of characters which has special meaning. This sequences will be replaced with something other, depending from the sequence. These sequences are called escape sequences. Full list of escape sequences follows:

- `\c -` Send this line without CR (Also can be used to specified empty send as in example above).
- `\d -` 0.25 sec pause
- `\n -` Line Feed character
- `\p -` 2 seconds pause
- `\r -` Carriage Return character
- `\s -` Space character
- `\t -` Tabulation character
- `\T -` Take the next phone number from port.phones variable
- `\P -` User password from auth.client.clientpass variable
- `\U -` User name from auth.client.clientname variable
- `\\ -` backslash ('\') character itself

> NOTE 1: No special characters will be replaced in the receive command. NOTE 2: Escape sequences are interpreted in `port.modem.init` as well. For example if modem init string contains `\T` sequence it should be replaced with `\\T` to avoid expanding it into phone number.

Return to documentation index | SafeFire PPP (C) Link Guard Solutions 1999, 2000