[Asterisk-Users] agi scripting in perl - dealiing with unexpected disconnects gracefully / spurious DTMF

Steven Critchfield critch at basesys.com
Wed Feb 18 16:00:11 MST 2004


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  <critch at basesys.com>




More information about the asterisk-users mailing list