*side note* <div><br></div><div>There is always a small potential for a race condition on the socket which is dealt with in the ESL client lib so you are safe as long as you use the official ESL client code.<div><br></div>
<div>If you want to avoid blocking api commands from stalling events, consider 2 socket objects, one for events and one for commands or use bgapi.</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jul 20, 2010 at 7:09 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><br><div class="gmail_quote"><div class="im">On Tue, Jul 20, 2010 at 1:46 AM, Helmut Kuper <span dir="ltr"><<a href="mailto:helmut.kuper@ewetel.de" target="_blank">helmut.kuper@ewetel.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hello,<br>
<br>
<br>
I have an inbound ESL script which has subscribed to several events. So<br>
there is more or less a continuing stream of events.<br>
<br>
When it sends a blocking api command to FS is it there a risk to get<br>
back an event first before FS sends the command reply or does FS<br>
guarantee that the command reply is always next after issuing a api command?<br></blockquote></div><div><br>If your script establishes the socket connection to FS and issues an api command (not a bgapi) then yes, it will block and wait for the response before anything else comes through. (BTW, Darren covers this quite nicely in chapter 9 of the new FS book so be sure to pick up a copy when it comes out in a few weeks. :)<br>
-MC<br></div></div><br>
<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><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div></div>