[Freeswitch-users] Dumping channel information into a Lua array

Avi Marcus avi at avimarcus.net
Thu Mar 13 20:18:29 MSK 2014


BTW, you can do:
show detailed_calls as xml
show detailed_calls as json
-- might have been easier/more robust to parse...

-Avi


On Thu, Mar 13, 2014 at 6:07 PM, Alex Lake <alex at digitalmail.com> wrote:

>  Well, what I did was quite complicated...
>
> Essentially, I have a web application running on a LAMP stack which hits
> the freeswitch socket with "api show detailed_calls". This is parsed (not
> that easy!) into key-value pairs to find the dialplan context of each call.
> It then iterates through the list of calls and if it find one that matches
> the dialplan filter specified by the user, it hits the freeswitch socket
> again with "api uuid_dump <uuid>".
> It takes the results of this and attempts to parse it into an array of
> key-value pairs.
> This is then filtered to display into a frame on the web page.
>
> Knowing what I know now, I could do what I was originally after far more
> easily - just execute "uuid_dump" and parse the results.
>
> However, it's very nice to have a web-based session inspector.
>
>   If you found it helpful -- can you share the basics?
>
>
> On Thu, Mar 13, 2014 at 1:35 PM, Alex Lake <alex at digitalmail.com> wrote:
>
>>  Sorry for the slow response...
>>
>> I was trying to get a way of dumping only "interesting" variables to the
>> console to aid in debugging without generating reams of irrelevant
>> variables!
>> I've got a totally different method now that uses the api.
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:consulting at freeswitch.orghttp://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>
> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
>
> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4259 / Virus Database: 3722/7187 - Release Date: 03/12/14
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140313/bd319672/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list