Re: [asterisk-users] How run AsyncAGI commands in background
Hi Moy, many thanks for clarifying. I'll do some further investigations about it and I'll post the result here. Regards Jose Moises Silva escribió: On Fri, Jun 19, 2009 at 5:32 AM, Jose Ariascyr2...@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. ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
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. Thanks all Jose Moises Silva escribió: On Sun, Jun 7, 2009 at 4:37 PM, Jose Ariascyr2...@gmail.com wrote: Hi Moy, I'll do it so, but for your answer, it seems you are thinking about it as it could be a bug. I don't think so. I mean: the redirect action on a channel in AsyncAGI stops the current agi execution. It's the normal behavior. It's the way to stop a playfile on a channel if it was previously launched from AsyncAGI: making a redirect out of the AsyncAGI loop. Therefore, when I realized the previously launched EXE MixMonitor AsyncAGI execution was stopping after doing a redirect to meetme, I didn't think it was a bug. I though what I was needing it was a way to tell AsyncAGI, hey, don't stop this agi execution on the channel, even it will be redirected out of AGI on an individual basis for each AsyncAGI EXEC command launched. Thanks Jose The way I see it if you make EXEC MixMonitor inside AsyncAGI loop and then redirect to MeetMe and you don't get the audio recorded, then it's not a normal behavior, MixMonitor is an application that should passively monitor the channel audio independently of where the channel is (regardless of whether the command was executed in Async AGI or dial plan or whatever). However you are also using an old asterisk version and is not likely you can report a bug unless you upgrade to the latest Asterisk and reproduce without a patched Asterisk (for example executing EXEC MixMonitor inside a regular AGI script and then redirect to MeetMe). ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
On Fri, Jun 19, 2009 at 5:32 AM, Jose Ariascyr2...@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. m...@sangoma.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
Moises Silva schrieb: On Sat, Jun 6, 2009 at 7:18 PM, Philipp Kempgenphilipp.kemp...@amooma.de wrote: Jose Arias schrieb: Hi, Asterisk 1.4.18 AsyncAGI patch from //http://moythreads.com/testasync2.diff http://moythreads.com/testasync2.diff// Regards So what? What do you mean with so what?, if you have not been involved in the conversation you would not understand. http://lists.digium.com/pipermail/asterisk-users/2009-June/232995.html Sorry for the noise. I didn't realize this was a discussion. The message didn't quote anything and the subject didn't start with Re: so it appeared as if Jose was just posting his version of Asterisk without any context. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 - http://www.amoocon.de -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
Never mind, it was my mistake. I had some problems with my email client. Regards Jose 2009/6/7 Philipp Kempgen philipp.kemp...@amooma.de Moises Silva schrieb: On Sat, Jun 6, 2009 at 7:18 PM, Philipp Kempgenphilipp.kemp...@amooma.de wrote: Jose Arias schrieb: Hi, Asterisk 1.4.18 AsyncAGI patch from //http://moythreads.com/testasync2.diff http://moythreads.com/testasync2.diff// Regards So what? What do you mean with so what?, if you have not been involved in the conversation you would not understand. http://lists.digium.com/pipermail/asterisk-users/2009-June/232995.html Sorry for the noise. I didn't realize this was a discussion. The message didn't quote anything and the subject didn't start with Re: so it appeared as if Jose was just posting his version of Asterisk without any context. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 - http://www.amoocon.de -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
Hi Moy, I'll do it so, but for your answer, it seems you are thinking about it as it could be a bug. I don't think so. I mean: the redirect action on a channel in AsyncAGI stops the current agi execution. It's the normal behavior. It's the way to stop a playfile on a channel if it was previously launched from AsyncAGI: making a redirect out of the AsyncAGI loop. Therefore, when I realized the previously launched EXE MixMonitor AsyncAGI execution was stopping after doing a redirect to meetme, I didn't think it was a bug. I though what I was needing it was a way to tell AsyncAGI, hey, don't stop this agi execution on the channel, even it will be redirected out of AGI on an individual basis for each AsyncAGI EXEC command launched. Thanks Jose Moises Silva escribió: then it should work, create a *simple* extensions.conf and pastebin it along with instructions so I can try to reproduce. On Sat, Jun 6, 2009 at 5:02 PM, Jose Ariascyr2242 at gmail.com http://lists.digium.com/mailman/listinfo/asterisk-users wrote: / Hi, / / Asterisk 1.4.18 / / AsyncAGI patch from http://moythreads.com/testasync2.diff / / Regards / / Jose / ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
On Sun, Jun 7, 2009 at 4:37 PM, Jose Ariascyr2...@gmail.com wrote: Hi Moy, I'll do it so, but for your answer, it seems you are thinking about it as it could be a bug. I don't think so. I mean: the redirect action on a channel in AsyncAGI stops the current agi execution. It's the normal behavior. It's the way to stop a playfile on a channel if it was previously launched from AsyncAGI: making a redirect out of the AsyncAGI loop. Therefore, when I realized the previously launched EXE MixMonitor AsyncAGI execution was stopping after doing a redirect to meetme, I didn't think it was a bug. I though what I was needing it was a way to tell AsyncAGI, hey, don't stop this agi execution on the channel, even it will be redirected out of AGI on an individual basis for each AsyncAGI EXEC command launched. Thanks Jose The way I see it if you make EXEC MixMonitor inside AsyncAGI loop and then redirect to MeetMe and you don't get the audio recorded, then it's not a normal behavior, MixMonitor is an application that should passively monitor the channel audio independently of where the channel is (regardless of whether the command was executed in Async AGI or dial plan or whatever). However you are also using an old asterisk version and is not likely you can report a bug unless you upgrade to the latest Asterisk and reproduce without a patched Asterisk (for example executing EXEC MixMonitor inside a regular AGI script and then redirect to MeetMe). -- 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. m...@sangoma.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] How run AsyncAGI commands in background
Hi, Asterisk 1.4.18 AsyncAGI patch from //http://moythreads.com/testasync2.diff http://moythreads.com/testasync2.diff// Regards Jose ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
then it should work, create a *simple* extensions.conf and pastebin it along with instructions so I can try to reproduce. On Sat, Jun 6, 2009 at 5:02 PM, Jose Ariascyr2...@gmail.com wrote: Hi, Asterisk 1.4.18 AsyncAGI patch from http://moythreads.com/testasync2.diff Regards Jose ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- 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. m...@sangoma.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
Jose Arias schrieb: Hi, Asterisk 1.4.18 AsyncAGI patch from //http://moythreads.com/testasync2.diff http://moythreads.com/testasync2.diff// Regards So what? Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 - http://www.amoocon.de -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
On Sat, Jun 6, 2009 at 7:18 PM, Philipp Kempgenphilipp.kemp...@amooma.de wrote: Jose Arias schrieb: Hi, Asterisk 1.4.18 AsyncAGI patch from //http://moythreads.com/testasync2.diff http://moythreads.com/testasync2.diff// Regards So what? What do you mean with so what?, if you have not been involved in the conversation you would not understand. http://lists.digium.com/pipermail/asterisk-users/2009-June/232995.html -- 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. m...@sangoma.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
I'm sorry, in my last email, where I said redial, I mean redirect. Thanks Jose 2009/6/5 Jose Arias cyr2...@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 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] How run AsyncAGI commands in background
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 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How run AsyncAGI commands in background
On Fri, Jun 5, 2009 at 4:32 PM, Jose Ariascyr2...@gmail.com wrote: I'm sorry, in my last email, where I said redial, I mean redirect. Thanks Jose 2009/6/5 Jose Arias cyr2...@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. m...@sangoma.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users