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 <[email protected]> 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
> [email protected]
> 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:[email protected] <msn%[email protected]>
GTALK/JABBER/PAYPAL:[email protected]<paypal%[email protected]>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:[email protected] <sip%[email protected]>
iax:[email protected]/888
googletalk:[email protected]<googletalk%3aconf%[email protected]>
pstn:213-799-1400
_______________________________________________
FreeSWITCH-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org