@echo off
CLS
IF %5 == 131  goto PPPCOM3
IF %5 == 132  goto PPPCOM5
IF %5 == 133  goto PPPCOM7
IF %5 == 134  goto PPPCOM8
IF %5 == 135  goto PPPCOM9
IF %5 == 99   goto FAXIN
GOTO ENDE

:PPPCOM3
REM PPP ON LINE 1 COM3

ppp.exe com3 %1 mru 1500 rtscts modem 192.168.1.1: netmask 255.255.255.0 priority 1 restart silent exit name gate1 +pap
GOTO ENDE

:PPPCOM5
REM PPP ON LINE 2 COM5
ppp.exe com5 %1 mru 1500 rtscts modem 192.168.1.1: netmask 255.255.255.0 priority 1 restart silent exit name gate2 +pap
GOTO ENDE

:PPPCOM7
REM PPP ON LINE 3 COM7
ppp.exe com7 57600 mru 1500 rtscts modem 192.168.1.1: netmask 255.255.255.0 priority 1 restart silent exit name ISDN1 +pap
GOTO ENDE

:PPPCOM8
REM PPP ON LINE 4 COM8
ppp.exe com8 57600 mru 1500 rtscts modem 192.168.1.1: netmask 255.255.255.0 priority 1 restart silent exit  name ISDN2 +pap
GOTO ENDE


:FAXIN
Rem Die Faxsoft halt
\dfue\fax\bgfax2 /fco:4 \dfue\fax\IN h%3 f
IF ErrorLevel == 4 Goto FAXOK
net send *  FAX  ERROR
go ENDE
:FAXOK
net send *  ACHTUNG ein FAX wurde empfangen

:ENDE

