forked from Mirrors/freeswitch
a53236da7f
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16161 d0543943-73ff-0310-b7d9-9358b9ac24b2
25 lines
533 B
C
25 lines
533 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <esl.h>
|
|
|
|
|
|
int main(void)
|
|
{
|
|
esl_handle_t handle = {{0}};
|
|
|
|
esl_connect(&handle, "localhost", 8021, NULL, "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;
|
|
}
|