I could not find any reason other than the connection is not released from a previous dial or another job. I would like to suggest making several attempts. Try this script as an example. // set 3 minutes as a timeout, change it if you want Dim timeout, number, 3 OnErrorGoTo WAIT_AND_TRY_AGAIN REDIAL: RASDial phonebook_entry, user_name, password, connection // if we are here, RASDial succeeded, now jump to the main part of the script GoTo MAIN_PART: WAIT_AND_TRY_AGAIN: // if we are here, RASDial failed. Wait 60 seconds and try again Wait 60 Subtract Timeout, 1, Timeout If Timeout, REDIAL, ERROR_HANDLING ERROR_HANDLING: .... put here what you want to do if all 4 dial out attempts failed Exit MAIN_PART: OnErrorStop .... continue your script here ...
|