[Freeswitch-users] CLI

Markus Lindenberg markus.lindenberg at gmail.com
Fri May 23 11:32:17 MSD 2014


Hi Keith,

I use mod_xml_rpc for exaclty that use case. It's very fast and easy to
use, no process spawning involved and no ESL client necessary. Perfect for
request based clients.

This is a python snippet that gives me the list of channels as xml and
parses them into a dict:

from xmlrpclib import ServerProxy
from xml.etree.cElementTree import XML
server = ServerProxy('http://foo:bar@127.0.0.1:8080')
response = server.freeswitch.api('show', 'channels as xml')
channels = []
for row in XML(response):
    channels.append(dict([(e.tag, e.text) for e in row]))

Best regards,

Markus



On Thu, May 22, 2014 at 11:02 AM, Keith <keith at hubner.co.uk> wrote:

> Hi all,
>
> I am looking to build a web page which will give me some live overview of
> call details, e,g, number of calls to a certain number etc. I am looking to
> use fs_cli -x to achieve this, was wondering if doing this adds much load
> to the box and could interfere with calls in any way. I use SNMP of other
> stats which I believe is less intrusive, but gives me less info.
>
> Cheers
> Keith
>
> _________________________________________________________________________
> 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/20140523/56c1f75a/attachment-0001.html 


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