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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtain results from Connection Directory call

Status
Not open for further replies.

KeithFrench

Programmer
Jul 20, 2001
25
0
0
GB
If I dial a data entry from within a script using the connection directory:-

dial data name

Is there a way to extract the success or failure of this? I want to write to a log file showing what entries failed due to no dial tone, or busy tone etc.

Once I have the result of a call in a string it is easy enough to write this info to a text file.
 
What I usually do is have an if $CARRIER/else/endif structure to determine if the script made a conection, then use a waitfor command to look for a bit of a string (such as a loging prompt or banner message) to make sure the connection is good. You should be able to access the value in the $CNCTMSG system variable for more information if a connection was not made, although I think I had run into some problems with that in the past.


aspect@aspectscripting.com
 
Knob,

I already use If $CARRIER in the manner you mention to determine if the call has connected as you have suggested. I also check for a prompt back from the remote system if it is a good call.

The system variable $CNCTMSG only seems to contain the resilts of a succesfull call, whereas I am interested in why a call failed. Do you know of any other way when using the connection directory to dial the number to inform a script if it gets busy tone, no answer or no dial tone?
 
Ah, good point, the help file does indicate that $CNCTMSG only contains the modem's response if the connection attempt was successful. I overlooked that when I read the help file yesterday.

I'll play around with this some more tonight when I'm at a system with a modem. I seem to recall that another Procomm user (may or may not have been on this forum) had a similar problem and came up with a workaround but I don't recall it off the top of my head. It may have been to dial the number in modem command mode instead of using the Connection Directory.


aspect@aspectscripting.com
 
Yes I thought about using modem command mode as well, but was trying to stick to the connection directory method.
 
I did some more digging around over the weekend and wasn't able to find a solution. I'll check with another ASPECT developer and see what he can dig up.


aspect@aspectscripting.com
 
I talked to the other developer and he said the only method to get the reason for a failed call is to use modem command mode and read the response back from the port.

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top