On Fri, 3 Feb 2012, Yaroslav Panych wrote:

2012/2/3 Danny Nicholas <[email protected]>:
<start music>
Fork or shell task 1
Fork or shell task 2
<stop music>

What exactly commands I should invoke in AGI instead of <start music> and <stop music> ? STREAM FILE returns only after file ends, this is not what I want.

Execute 'stream file' in a separate thread.

The only 'restriction' is that you cannot execute any other AGI commands in the 'mainline' thread until either the 'background' thread finishes or you 'join' it.

This makes sense if you think about how the AGI protocol is implemented -- write a request, read a response, rinse, lather, repeat. If you don't read the response (which will block execution until 'stream file' finishes), you violate the protocol.

This includes seemingly innocuous AGI commands like 'verbose.' Think of it like 'all Asterisk interaction has to be done in the background thread' as long as the background thread is executing.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to