Hey there, FsGui uses ESL a lot and I had to go through the code to document it so here is a few hints inline ...
Don't hesitate to keep the questions coming. I will fill in whenever I can.
jmesquita
On Aug 23, 2009, at 6:27 PM, Matt Riddell wrote:
> Hi,
>
> I don't see how I can read some responses to command using esl.
>
> I.E. esl_send_recv(&handle, "api show calls count\n\n");
>
> and
>
> printf("Header Test %s\n", esl_event_get_header(event, "API-
> Command"));
> printf("Body Test %s\n", esl_event_get_body(event));
>
> the header details are returned.
>
> The body is null.
I'm not too sure about using ESL in C, I have used it pretty much
exclusively in perl.
originate {account_code=1234}sofia/profile/target@ip ....
> Also, I can originate a call and set the account code for it, but
> how do
> I get a list of calls with their account codes?
You can get the list of the channels via "show channels" or bridged
calls with "show calls"
From there you have the UUID's you can call uuid_dump on them to get
all the variables.
> Do I get a list of calls then go through them one by one and get the
> variables for those calls by uuid?
You could do this or setup a listener to get the events as they happen
and keep the info you need.
http://docs.freeswitch.org/ (this should help, its under files list
> Does anyone have any documentation for the esl api?
see esl.h)
I just find it interesting you're doing this with C.
> Even if I could read some comments from a usage of it would be useful.
> --
> 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
_______________________________________________
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