[Freeswitch-users] Couple of questions
Brian West
brian at freeswitch.org
Sun Aug 23 16:50:27 PDT 2009
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.
> 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?
originate {account_code=1234}sofia/profile/target at ip ....
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.
> Does anyone have any documentation for the esl api?
http://docs.freeswitch.org/ (this should help, its under files list
see esl.h)
> Even if I could read some comments from a usage of it would be useful.
I just find it interesting you're doing this with C.
> --
> 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
More information about the FreeSWITCH-users
mailing list