<div>Although I do it using ESL it may be helpful for your case. When issuing the broadcast request I create a 'correlation ID' variable with a generated unique ID (can be any suitable string) for each file to be broadcast. The ID is passed back to the ESL app after each particular file stops playing back.</div>
<div><br></div><div>In the ESl language I issue the command "execute playback file_string://myfile.mp3{CorrelationID=myuniqueID}" and then wait for an event with the correct correlation ID.</div><div><br></div>
Hynek<br>
<br>
<br><br><div class="gmail_quote">On Mon, Jan 30, 2012 at 5:40 PM, Michael Lutz <span dir="ltr"><<a href="mailto:mytemike72@gmail.com">mytemike72@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
I am dealing with a little problem...<br>
<br>
To play asynchronous audio in my Lua script I use the api function<br>
"uuid_broadcast {uuid} {fileName} aleg". This all works well and audio<br>
is being buffered if I call my function multiple times.<br>
When I want to abort all plays and flush the buffer I use "uuid_break<br>
{uuid} all". This all works excellent!<br>
<br>
My problem is I at certain points need to know if audio is being<br>
played (or awaits in the buffer) and need to pause execution untill<br>
all audio is beging played (or flushed).<br>
<br>
Is there a way of doing this in either Lua or apiFunctions? or a<br>
channel variable perhaps? I have looked and tryed but cannot seem to<br>
find a way doing this.<br>
<br>
<br>
Any hints (or solution ;-) appreciated!<br>
<br>
<br>
Regards,<br>
Michael Lutz<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>