<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>The use case is as follows;</DIV>
<DIV> </DIV>
<DIV>Multi-threaded Java applicaton that sends bgapi commands to several
channels in parallel over the same ESL connection.</DIV>
<DIV>(bgapi commands are serialized in order to the socket outputstream, but is
there any guarantee that we will receive the OK / ERR reply for each bgapi in
the correct order from the socket inputstream?)</DIV>
<DIV> </DIV>
<DIV>And, what about sending bgapi commands on the same socket while a ‘regular’
api command is currently executing? I suspect the bgapi reply will delay until
the ‘regular’ (blocking) api command is finished processing?</DIV>
<DIV> </DIV>
<DIV>- Mauritz</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=msc@freeswitch.org
href="mailto:msc@freeswitch.org">Michael Collins</A> </DIV>
<DIV><B>Sent:</B> Thursday, February 24, 2011 9:44 PM</DIV>
<DIV><B>To:</B> <A title=freeswitch-users@lists.freeswitch.org
href="mailto:freeswitch-users@lists.freeswitch.org">FreeSWITCH Users Help</A>
</DIV>
<DIV><B>Subject:</B> Re: [Freeswitch-users] Receive order guarantee for bgapi
command replies over ESL?</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">Just
curious - what is the use case where sending a stack of bgapi's without
listening for the reply is more desirable than looping through the bgapi
send/reply sequence for each one? I'm no super programmer but it seems to me
that blindly relying on another system to always send stuff in the exact correct
order is dangerous and may cause bugs that are difficult to diagnose. Personally
I would consider it a programming best practice to wait for the response of the
bgapi before sending another one.
<DIV> </DIV>
<DIV>I invite other socket programmers to give their input...</DIV>
<DIV> </DIV>
<DIV>-MC</DIV>
<DIV> </DIV>
<DIV>P.S - you may wish to disable the legal notice at the and of your emails
when sending to a public list. (We know that some servers tag outgoing messages
automatically and if that is your case we understand. Go yell at the I.T. guy!
:)<BR>
<DIV>
<DIV> </DIV>
<DIV class=gmail_quote>2011/2/24 Mauritz Løvgren <SPAN dir=ltr><<A
href="mailto:mauritz.lovgren@hotmail.com">mauritz.lovgren@hotmail.com</A>></SPAN><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>Are replies for bgapi commands sent back to an inbound socket connection
in the same order as the commands were sent?</DIV>
<DIV> </DIV>
<DIV>Example: sending 10 bgapi messages from client to freeswitch socket with
no delay inbetween.</DIV>
<DIV>Will the response for those command messages be sent back by freeswitch
in the exact same order as their commands were received, or should one wait
for each reply before sending a new bgapi command to be sure one gets a reply
for the correct command?</DIV>
<DIV> </DIV>
<DIV>If there was an option of providing a UUID (or sequenceId) for the
command, it would be easier to match the reply with the request upon receival,
but this doesn’t seem to be possible with the current implementation?</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Mauritz Lovgren</DIV>
<DIV>Systems Architect</DIV>
<DIV>IPLink Inc.</DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>FreeSWITCH-users mailing
list<BR>FreeSWITCH-users@lists.freeswitch.org<BR>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<BR>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<BR>http://www.freeswitch.org<BR></DIV></DIV></DIV></BODY></HTML>