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!

whats wrong with this?

Status
Not open for further replies.

mntlfngrs

Technical User
Apr 13, 2002
36
0
0
US
proc main

while $carrier ; execute while call is connected

when quiet 300 call done ; Waits for line to be quiet for 600 seconds to call done

endwhile

endproc

proc done

transmit "OFF^M" ; Transmit a hangup call.

hangup ; Hang up the phone line.

endproc

I'm trying to hang up if the call is inactive for specific time and stop the script if the call is disconnected. I know there should be an easy way to do this. I keep getting "Error 3: Insufficient memory" at source "when quiet 300 call done"

We were using this first which worked but continued to run after call was disconnected.


proc main

waitquiet 600 FOREVER ; Wait until the line is quiet for 600 seconds.

transmit "OFF^M" ; Transmit a hangup call.

hangup ; Hang up the phone line.

endproc


any solutions? "Be all and you'll be to end all.
Life can be a real ball.
State of mind!"
 
Try moving the when quiet command outside (in front of) the while loop. Each time the while loop executes, the when command is executed again. I don't know off the top of my head if the new when command "overwrites" the old when command or if another when command is made active. If the latter, then you could quickly have hundreds of active when commands, which could cause problems. I recall this being a problem or limitation in earlier versions of Procomm. Give this a try and see if your insufficient memory problems go away.
 
Worked like a charm Knob! Thanks, I knew it had to be something simple. So obviously it does make a new when on every loop.

Thanks,
Adam "Be all and you'll be to end all.
Life can be a real ball.
State of mind!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top