[Freeswitch-dev] api getvar / setvar problem

Anthony Minessale anthony.minessale at gmail.com
Tue Nov 10 08:37:26 PST 2009


Are you writing your own client code?
What language are you using?
Have you seen the ESL library in tree that can be used as a client?

If you are writing your own client:
 are you following the protocol properly?
 read lines only until you reach 2 newline in a row while collecting headers
 when you have read 2 newline if there was a content-type you must read that
exact number of bytes no more or no less.
When you send commands are you terminating them with 2 newlines?
Have you disabled nagle's algorithm?

If you lose your framing somewhere you will certainly mess up eventually.

This is why I wrote the ESL lib for everyone to use.


On Mon, Nov 9, 2009 at 9:19 PM, Bob Coleman <bobc at devassert.com> wrote:

> Hi,
>
> I am pretty sure I am doing something wrong but here goes.
>
> I am using outbound event socket running on windows and everytime I
> send an api uuid_getvar or uuid_setvar the reply I get back is
> fragmented.
>
> I get the content type and the line that tells me the length, but then
> I get a blank line and nothing more coming down the socket. If I try
> to read another line after the blank line it blocks.
>
> eg.
> content-type: api/response
> content-length: ??
>
> If I make another call, say just api i get the actual variable
> contents i expected from the first call followed by the next content
> header??
>
> I can product a small demo if necessary, and that is my next step for
> diagnosing this, ie remove all the back ground stuff and focus on the
> problem, but I am hoping someone else has come across this and can
> point me in the right direction
>
> Cheers
>
> Bob
>
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> 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>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20091110/8a11b153/attachment.html 


More information about the FreeSWITCH-dev mailing list