[Asterisk-Users] Terminating AGI Scripts
Douglas Garstang
dgarstang at oneeighty.com
Mon Feb 13 21:39:52 MST 2006
I don't think that will work. I wanted to catch any number dialled and put _everything_ through the script. If there's bits in the script and bits in extensions.conf, it becomes a mess. It also increases load if you have to execute multiple AGI scripts for a single call, rather than just once.
It also isn't as simple as executing a single dial command. We may want to execute any Asterisk application for a given number. Queue, Meetme for example.
Argh, why does this have to be so hard.
-----Original Message-----
From: Andy Brezinsky [mailto:andy at mbrez.com]
Sent: Mon 2/13/2006 9:32 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Cc:
Subject: Re: [Asterisk-Users] Terminating AGI Scripts
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.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list