Thanks - that gave me the basis for a couple of google searches. Near the top of the script I put in $SIG{HUP} = \&exitGracefully;
and I added a subroutine that looks like this: sub exitGracefully { exit(0); } It now kills itself off without needing to be killed and take * with it. THANKS!!! -Tim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Critchfield Sent: Wednesday, February 18, 2004 8:00 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] agi scripting in perl - dealiing withunexpected disconnects gracefully / spurious DTMF On Wed, 2004-02-18 at 11:11, Tim Petlock wrote: > If everything is entered correctly and perfectly the script works and > the call goes through. However, I've found that if I enter only a > partial "calling card number" and then hang up the script will continue > to run with the perl process that it lives inside of taking up lots of > processor time and for each failed call you get one of those > disconnected processor-hungry processes. When a user disconnects and asterisk hangs up the line, it closes it's side of the pipes it uses to talk to AGI. If you don't handle a null read from the pipe as a hangup, then it writes commands to asterisk and then gets a null read back and loops hard and fast. Maybe if I get some more time later I'll read the rest of that lengthy post and see if there are more answers for you. -- Steven Critchfield <[EMAIL PROTECTED]> _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users