<div dir="ltr">ESL gives you more control, especially to execute things in parallel.<div>If you want to do it within FS, that's a little more complicated, since most things are sequential.</div><div><div><br></div><div>
However, if you use the async APIs, then I think it could work:</div><div>1) <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_sched_broadcast">sched_broadcast</a> -- schedule the playback of your file on the UUID of the channel, for +0, meaning now.</div>
<div>2) run your lua script</div><div>3) Then stop (break) the playback on that uuid: <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_break">break</a></div><div>4) Continue with your execution.</div><div><br>
</div><div>Please wikify your results and let us know how that works out!<br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi</span></div></div><br><div class="gmail_quote">
On Fri, Jan 25, 2013 at 3:34 AM, JP <span dir="ltr"><<a href="mailto:jaykris@gmail.com" target="_blank">jaykris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I want to do the following...<div><br></div><div>1. Play a long music file from a dialplan.</div><div>2. While the music is playing, I want to launch a Lua script to do some data dip.</div><div>3. Once the data is fetched and Lua exits, I want to interrupt the music and continue in the dialplan</div>
<div><br></div><div>How do I do this. Any sample code or pointers would be greatly appreciated.</div><div><br></div><div>Thanks</div>
<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>
<br></blockquote></div><br></div></div></div>