[Freeswitch-users] ESL: api command

Anthony Minessale anthony.minessale at gmail.com
Tue Jul 20 17:20:42 PDT 2010


*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 at freeswitch.org> wrote:

>
>
> On Tue, Jul 20, 2010 at 1:46 AM, Helmut Kuper <helmut.kuper at 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 at 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 at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100720/6205eea9/attachment.html 


More information about the FreeSWITCH-users mailing list