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!

How can I write a script that can determine what connection is open? 1

Status
Not open for further replies.
Oct 11, 2006
76
US
I've got several PBX's to support in several different time zones. If I see that the time is off, I have a script to adjust it based on my PC's time (which is set by the atomic clocks). However... if I'm dialed into a PBX in another time zone, I want my script to see what connection in the dialing directory is open so I can use a CASE statement to vary the time it uploads.

Is there a system variable that keeps the name of the dialed connection?
 
$MODEMCONNECT is a system variable that contains the current connection being used by Procomm. Will that work for you or are you looking for the Connection Directory entry name? If the latter, then use $DIALCONNECT if you have already dialed that entry (will be null otherwise).

 
That's exactly what I'm looking for, Knob. I use the Connection Directory, so $dialconnect will work. Basically, I just want to make a CASE statement so that if I happen to notice the system clock is off while I'm in there, I can just run my Set_Time program and not worry that it will screw up the time in the Chicago, NOLa or Houston PBX's.

Thanks very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top