I updated testclient.c so you can see how now.

#include <stdio.h>
#include <stdlib.h>
#include <esl.h>


int main(void)
{
    esl_handle_t handle = {{0}};

    esl_connect(&handle, "localhost", 8021, "ClueCon");

    esl_send_recv(&handle, "api status\n\n");

    if (handle.last_sr_event && handle.last_sr_event->body) {
        printf("%s\n", handle.last_sr_event->body);
    } else {
        // this is unlikely to happen with api or bgapi (which is hardcoded above) but prefix but may be true for other commands
        printf("%s\n", handle.last_sr_reply);
    }

    esl_disconnect(&handle);

    return 0;
}


On Mon, Aug 24, 2009 at 1:07 AM, Matt Riddell <matt@venturevoip.com> wrote:
On 24/08/09 4:27 PM, Joćo Mesquita wrote:
>
> I need to work a little bit more on that documentation as well.. I saw a
> few conflicts with the core documentation too. Will get there once I
> have some more time left.

Awesome man - thanks for these.

So, one more question - in the show calls (or show channels) api
response, which header would I use to retrieve the response?

--
Cheers,

Matt Riddell
Director
_______________________________________________

http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)

_______________________________________________
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
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400