*side note* 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. 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. On Tue, Jul 20, 2010 at 7:09 PM, Michael Collins <msc@freeswitch.org> wrote:
On Tue, Jul 20, 2010 at 1:46 AM, Helmut Kuper <helmut.kuper@ewetel.de>wrote:
Hello,
I have an inbound ESL script which has subscribed to several events. So there is more or less a continuing stream of events.
When it sends a blocking api command to FS is it there a risk to get back an event first before FS sends the command reply or does FS guarantee that the command reply is always next after issuing a api command?
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. :) -MC
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900