home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- CLS
- ECHO - Call Router Demo -
- ECHO Please distribute this file unaltered.
- ECHO.
- ECHO This batch file demonstrates how Call Router V1.4
- ECHO may be used on a standard telephone...
- ECHO.
- ECHO In this particular example, an event is executed when 10 rings
- ECHO have been detected. The event can be any program that you wish by
- ECHO simply inserting a call to it in this batch file. Left unmodified,
- ECHO this file will simply show you where it would have executed.
- ECHO.
- ECHO Call Router is user supported software. To assist in the future
- ECHO development of Call Router register today. Please consult the
- ECHO documentation for details.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- ECHO.
- PAUSE
-
- IF "%1" == "" goto Usage
-
- :Start
- REM Start program with COM port taken from command-line.
- REM Call Router will answer after 10 rings.
- CALLROUT %1 rings 10
-
- REM After 15 rings have been successfully counted...
- IF ERRORLEVEL 3 goto Event
-
- REM Program timed out... caller hung up before 15 rings.
- IF ERRORLEVEL 2 goto Start
-
- REM Program error condition!
- IF ERRORLEVEL 1 goto Error
-
- REM Program ended normally...
- IF ERRORLEVEL 0 goto End
-
- :Usage
- CLS
- ECHO.
- ECHO Please specify which COM port to use.
- ECHO Correct usage is: CRDEMO n
- ECHO where: n = 1,2,3, or 4 (COM port to open)
- ECHO.
- goto End
-
- :Event
- CLS
- ECHO.
- ECHO 10 rings were counted... insert your program here!
- ECHO.
- PAUSE
- goto Start
-
- :Error
- ECHO.
- ECHO Call Router ended with an error!
- ECHO.
-
- :End
-