home *** CD-ROM | disk | FTP | other *** search
- # Dialing macro :
- # Must be used with a configuration with modem validated but no telephone
- # number. To use only in case of modem problems
-
- # modify the variable Number to change the dialing Number
- # For modems that needs initialisation strings, fill the variable InitString
- # The time out is 45 sec, change the last sendandreceive command if needed
-
-
- SET Number ""
- SET InitString ""
-
- echo "Reseting Modem"
-
- sendandreceive 5 "ATZ\r" "OK"
- IfError ResetFailed
- echo "Modem Reset Successfull"
- GetVar InitString
- IfEqual "" NoInit
- echo "Modem Initialisation"
- sendandreceive 5 %InitString "OK"
- IfError InitFailed
- echo "Modem Initialisation Successfull"
-
- Label NoInit
- GetVar Number
- IfEqual "" NoNumber
-
- echo "Dialing 45 Sec..."
-
- send "ATDT"
- send %Number
- sendandreceive 45 "\r" "CONNECT"
- ifequal "CONNECT" ConnectOk
- echo "Connection Failed, Check Error Message "
- pause 10
- return
-
- Label ConnectOk
- echo "Connection Successfull"
- pause 5
- return
-
- Label ResetFailed
- echo "Modem Reset Failed"
- pause 5
- Exit
-
- Label InitFailed
- echo "Modem Init Failed"
- pause 5
- Exit
-
- Label NoAnswer
- echo "No Answer From Remote Modem "
- pause 5
- Exit
-
- Label NoNumber
- echo "No Number In The Macro "
- pause 5
- Exit
-
-
-