Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carrier detect

Status
Not open for further replies.

trompeteroloco

Programmer
Dec 19, 2002
1
US
This may be a simple problem for you experienced Aspect programmers but, I need to be able to detect when the carrier is lost during script execution and restart the script (ie. redial and run through the process again). I have been trying to accomplish this but the script just stops when the carrier is lost.
 
You can check the value of the $CARRIER system variable to do this. If $CARRIER is zero, then carrier detect has been lost, while 1 means a connection is established. Probably the easiest way to do this is to use a when $CARRIER call procname structure. Whenever the value of $CARRIER changes, a procedure named procname is called. In that procedure, you check to see if $CARRIER is 0 or 1. If zero, then you would perform whatever steps necessary to rectify this situation.

I have a sample script (ExitOnDisconnect.was) at that shows how to do this. The use of the script is slightly different than your situation, but it should give you a good starting point.
aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top