[asterisk-users] How run AsyncAGI commands in background

Moises Silva moises.silva at gmail.com
Fri Jun 5 18:27:05 CDT 2009


On Fri, Jun 5, 2009 at 4:32 PM, Jose Arias<cyr2242 at gmail.com> wrote:
> 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
>>
>

version of Asterisk?

-- 
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