<div dir="ltr">I think you're doing the wrong approach here. It's better to send the command, and then handle the event when the playback is finished. The actual execute command is synchronous, however, since all it does is to add the playback on a queue, it will return imediately.<div>
<br></div><div>If you need other behaviour, just wait for the event, and then continue in your code - but you will need to implement this for your needs.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-07-04 10:24 GMT+02:00 Yisroel M. Olewski <span dir="ltr"><<a href="mailto:yisroel@machshevet.com" target="_blank">yisroel@machshevet.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hi everyone<u></u><u></u></p><p class="MsoNormal">I’m using <i>eslconnection.execute</i> to <i>playback</i> a music file, but the code just sends the command and continues running<u></u><u></u></p>
<p class="MsoNormal">This is not good for me, since I need to block code execution until the file finishes<u></u><u></u></p><p class="MsoNormal"><i>Eslconnection.api</i> is supposed to be sync but doesn’t have a uuid parameter<u></u><u></u></p>
<p class="MsoNormal">Actually <i>execute</i> itself is also supposed to be sync<u></u><u></u></p><p class="MsoNormal">How can this be done?<u></u><u></u></p><p class="MsoNormal">I’ve seen a few questions about it, but no answers<u></u><u></u></p>
<p class="MsoNormal">Thanks and All the best!<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><i><span style="color:#0f243e">Sincerely,<u></u><u></u></span></i></p><p class="MsoNormal"><i><span style="color:#0f243e">Yisroel M. Olewski <u></u><u></u></span></i></p>
<p class="MsoNormal"><i><span style="color:#0f243e">CEO<u></u><u></u></span></i></p><p class="MsoNormal" align="center" style="text-align:center"><span style="color:#1f497d"><img width="280" height="69" src="cid:image002.png@01CF977A.93566230"><u></u><u></u></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><a href="http://Machshevet.com" target="_blank">Machshevet.com</a><span style="color:#1f497d"><u></u><u></u></span></p><p class="MsoNormal" align="center" style="text-align:center">
<span style="color:#1f497d"><a href="tel:%2B972%20%2852%29%20764-9971" value="+972527649971" target="_blank">+972 (52) 764-9971</a><u></u><u></u></span></p><p class="MsoNormal" align="center" style="text-align:center"><b><span style="font-size:10.0pt;color:#1f497d">Websites </span></b><b><span style="font-size:10.0pt;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;color:#1f497d"> CRM </span></b><b><span style="font-size:10.0pt;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;color:#1f497d"> ERP </span></b><b><span style="font-size:10.0pt;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;color:#1f497d"> Telephony </span></b><b><span style="font-size:10.0pt;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;color:#1f497d"> Inventory </span></b><b><span style="font-size:10.0pt;color:#1f497d">·</span></b><b><span style="font-size:10.0pt;color:#1f497d"> Content Management</span></b><b><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d"><u></u><u></u></span></b></p>
<p class="MsoNormal"><u></u> <u></u></p></div></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>