[asterisk-users] How run AsyncAGI commands in background

Jose Arias cyr2242 at gmail.com
Fri Jun 5 16:32:19 CDT 2009


I'm sorry,
in my last email, where I said redial, I mean redirect.
Thanks
Jose
2009/6/5 Jose Arias <cyr2242 at gmail.com>

> Hi all,
> I have an external application commanding asterisk by AMI and AsyncAGI. I
> also have a dialplan like this:
>
> ; AsyncAGI extensions
> exten => _8.,1,Noop(entering in AGI loop at 8 ${EXTEN});
> exten => _8.,n,AGI(agi:async);
> exten => _8.,n,Hangup();
>
> ; Meetme extensions
> exten => _1.,1,Noop(Conference ${EXTEN} ${CONTEXT});
> exten => _1.,n,Set(MEETME_RECORDINGFILE=${EXTEN:}-${UNIQUEID:})
> exten => _1.,n,MixMonitor(${MEETME_RECORDINGFILE}.wav)
> exten => _1.,n,Meetme(${EXTEN},qdx);
> exten => _1.,n,Hangup();
>
> It works fine:
>
> Incoming channels are sent to meetme by an external application, which
> receives events by AMI and decides what meetme to use, making a redirect
> action to it by AMI. Every channel falling in a meetme (dynamically
> created) is recorded by the MixMonitor application.
>
> But there's a little problem:
>
> I don't need to record all calls but only those ones are switable of be
> recorded (by some kind of external rules). As it's a waste of cpu and space
> to record everything and then to discard almost all of them but some few
> ones, I tought to use AsyncAGI to recording only some calls by sending an
> AsyncAGI EXE MixMonitor command instead of the dial plan approach.
>
> To do that, the external application, instead of making the redial to
> meetme, it must make the redial to an AsyncAGI extension, then it must make
> the AGI EXE MixMonitor action, and finally it must make the original
> redirect to meetme.
>
> But it doesn't work :-(
>
> When the application reachs the third step (redial to meetme while the
> channel is still into the AGI loop, after having sent it the AGI EXE
> MixMonitor action) the MixMonitor AGI action is stopped automatically and
> the recording ends.
>
> Therefore, does anyone know how to manage that an AsyncAGI action to remain
> running in background even if the channel is redirected out of AGI?
>
> Thanks in advanced
> Jose
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090605/f2bc5421/attachment.htm 


More information about the asterisk-users mailing list