[asterisk-users] How run AsyncAGI commands in background

Moises Silva moises.silva at gmail.com
Fri Jun 19 09:31:56 CDT 2009


On Fri, Jun 19, 2009 at 5:32 AM, Jose Arias<cyr2242 at gmail.com> wrote:
> Hi Moy,
>
> I'm using an asterisk 1.4.18 from scratch patched with the last AsyncAGI
> patch, which fixes a bug about stopping AsyncAGI applications, as may be you
> can recall from the thread [asterisk-users] async agi question in
> http://lists.digium.com/pipermail/asterisk-users/2009-April/230488.html.
>
> This patched asterisk works fine and it stops the async agi applications
> launched from the AsyncAGI loop before the Redirect as it's expected. It's
> for that I don't think stopping the mixmonitor application launched from the
> AsyncAGI loop would be a bug if I redirect the call. I would be only getting
> the same behavior than I got with the stream file application as you
> explained it should be at
> http://www.moythreads.com/wordpress/2007/12/24/asterisk-asynchronous-agi/#comment-365
>
> I'm only asking if there's any way to prevent stopping applications launched
> on a channel from the AsyncAGI loop if this channel is redirected afterward,
> with something like a continue_running_in_background flag in the previous
> AGI invocation from AMI. Of course, it bring us the problem we'll need some
> kind of identifier and some stop action to be able to stop those
> applications running in background launched from the AsyncAGI loop
>
> Anyway, as you asked me some days ago, I have published at
> http://docs.google.com/View?id=ahfnfrcrh3rr_4dkcx9dgw a simple configuration
> and a simple scenario in order you can try to reproduce what I'm saying.
>
> I don't need anyone to do anything for me. I'm willing to do the work, I
> like programming and trying new things as well, but I'll need some
> guidelines to go straight ahead.
>

Jose, the thing is that MixMonitor IS a background application in
nature, that's why I say is unexpected that after a redirect the
recording no longer works. In fact, that's why StopMixMonitor
application is needed, because all MixMonitor does is to launch a
background thread that hooks into the channel audio, then the channel
continues to execute other applications in the dial plan while this
background thread monitors its audio, on a redirect StopMixMonitor
thread should continue saving audio until StopMixMonitor is called.

-- 
Moises Silva
Software Developer
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON
L3R 9T3 Canada
t. 1 905 474 1990 x 128 | e. moy at sangoma.com



More information about the asterisk-users mailing list