[Asterisk-Users] Terminating AGI Scripts

Andy Brezinsky andy at mbrez.com
Mon Feb 13 21:32:36 MST 2006


Are you running dial from an AGI script?  We had this exact same problem with 
one of our setups.  Our solution was to run the Agi script and have it set a 
DIALCMD variable inside.  When the script terminates it check to see if 
DIALCMD is set and then dials that.  If inside your script you know you're 
going to dial and go away for a long time you do that, otherwise you can sit 
there the whole time and handle dial yourself.

All except one of our apps now use DIALCMD and has cut our system load by 75%

-- 
~Andy Brezinsky

On Monday 13 February 2006 11:26 pm, Douglas Garstang wrote:
> I've noticed that Asterisk AGI scripts don't terminate when a call is
> answered. Does anyone know how to do this? I would think that this would be
> a very big problem, if the scripts stayed in memory, doing nothing, until
> the call terminates.
>
> Not only do you have to have a process for routing each call, but all the
> previous calls, that are still in progress, also have scripts running. It
> wouldn't take very long for even the best system to become overloaded with
> processes.
>
> Wouldn't matter if it was AGI or FastAGI ether. Threads or processes,
> either way it's a resource that is essentially unbound, especially if you
> service lots of long calls. Once a call is answered anyway, I don't see a
> need for the script to continue running. Asterisk has done it's thing.
>
> Doug.




More information about the asterisk-users mailing list