<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Im trying your way now, and it seems to be working ok<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(im waiting for <span style='background:white;mso-highlight:white'>CHANNEL_EXECUTE_COMPLETE</span>)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>All the best<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#0F243E'>Sincerely,<o:p></o:p></span></i></p><p class=MsoNormal><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#0F243E'>Yisroel M. Olewski          <o:p></o:p></span></i></p><p class=MsoNormal><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#0F243E'>CEO<o:p></o:p></span></i></p><p class=MsoNormal align=center style='text-align:center'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><img width=280 height=69 id="Picture_x0020_2" src="cid:image001.png@01CF9940.887688A0"><o:p></o:p></span></p><p class=MsoNormal align=center style='text-align:center'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://Machshevet.com"><span style='color:blue'>Machshevet.com</span></a></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal align=center style='text-align:center'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>+972 (52) 764-9971<o:p></o:p></span></p><p class=MsoNormal align=center style='text-align:center'><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Websites </span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>·</span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> CRM </span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>·</span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> ERP </span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>·</span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> Telephony </span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>·</span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> Inventory </span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>·</span></b><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> Content Management</span></b><b><span lang=HE dir=RTL style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Peter Olsson [mailto:peter@olssononline.se] <br><b>Sent:</b> Friday, July 04, 2014 11:43 AM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] ESL Synchronous Playback<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>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.<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>2014-07-04 10:24 GMT+02:00 Yisroel M. Olewski &lt;<a href="mailto:yisroel@machshevet.com" target="_blank">yisroel@machshevet.com</a>&gt;:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi everyone<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I’m using <i>eslconnection.execute</i> to <i>playback</i> a music file, but the code just sends the command and continues running<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>This is not good for me, since I need to block code execution until &nbsp;the file finishes<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><i>Eslconnection.api</i> is supposed to be sync but doesn’t have a uuid parameter<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Actually <i>execute</i> itself is also supposed to be sync<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>How can this be done?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I’ve seen a few questions about it, but no answers<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks and All the best!<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><i><span style='color:#0F243E'>Sincerely,</span></i><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><i><span style='color:#0F243E'>Yisroel M. Olewski&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></i><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><i><span style='color:#0F243E'>CEO</span></i><o:p></o:p></p><p class=MsoNormal align=center style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:center'><span style='color:#1F497D'><img border=0 width=280 height=69 id="_x0000_i1025" src="cid:image002.png@01CF9940.887688A0"></span><o:p></o:p></p><p class=MsoNormal align=center style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:center'><a href="http://Machshevet.com" target="_blank">Machshevet.com</a><o:p></o:p></p><p class=MsoNormal align=center style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:center'><span style='color:#1F497D'><a href="tel:%2B972%20%2852%29%20764-9971" target="_blank">+972 (52) 764-9971</a></span><o:p></o:p></p><p class=MsoNormal align=center style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:center'><b><span style='font-size:10.0pt;color:#1F497D'>Websites · CRM · ERP · Telephony · Inventory · Content Management</span></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;<o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><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><o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>