I am by no means any type of programmer and have absolutely no skills in that field, but have been working on an Aspect script to automate dialing into the out of band management of the routers at my company. I have managed to get the script to work almost to completion, but cannot get it to terminate the call. The command is usually +++ but for some reason it doesn't take when I run the script. Can you please take a look at my script and see if you can spot the discrepancy, or no of the proper command to automate the termination. Please note that the number, password, and username are not real due to company restrictions. Thank you for your time.
proc main
commandmode on
transmit "ATDT"
transmit "number^M"
waitfor "ENTER PASSWORD: " FOREVER
transmit "password^M"
waitfor "CPM>"
transmit "/s^M"
waitfor "CPM>"
transmit "/c 16^M"
waitfor "ORT CONNECT^M^J"
transmit "^M"
waitfor "Username: "
transmit "doej^M"
waitfor "Password: "
transmit "password^M"
waitfor "router>" FOREVER
transmit "+++"
waitfor "K^M^J"
transmit "athn^M"
endproc
proc main
commandmode on
transmit "ATDT"
transmit "number^M"
waitfor "ENTER PASSWORD: " FOREVER
transmit "password^M"
waitfor "CPM>"
transmit "/s^M"
waitfor "CPM>"
transmit "/c 16^M"
waitfor "ORT CONNECT^M^J"
transmit "^M"
waitfor "Username: "
transmit "doej^M"
waitfor "Password: "
transmit "password^M"
waitfor "router>" FOREVER
transmit "+++"
waitfor "K^M^J"
transmit "athn^M"
endproc