I have created the activechannels script as recommended in another post to export active calls so that they may be displayed in a NMS. This is basically a "fs_cli -x distinct_channels" However, is it possible to show channels for a particular tech prefix? Or rather put, what is the syntax for the fs_cli -x show channels like <999>. Whereas 999 would be the tech prefix. Am I on the right track for building the logic to show active calls per customer? TGF
At approx line 3578 in mod_commands.c you have this: sprintf(sql, "select * from channels where hostname='%s' and uuid like '%s' or name like '%s' or cid_name like '%s' or cid_num like '%s' order by created_epoch", hostname, argv[2], argv[2], argv[2], argv[2]); So the five fields that the 'like' param includes are: hostname uuid name (that is, channel name) cid_name cid_num So in theory you can do something like this: show channels like sofia or show channels like freetdm or show channels like loopback It's my understanding that relying on the channel name in this manner has some drawbacks, as the name of the channel can change. Therefore it may be better for you to dump the whole list of channels and perform your parsing offline with a perl/python/whatever script. What is the ultimate output format that you are wanting? -MC On Thu, Nov 25, 2010 at 10:17 PM, Francis Trevor <fiberhaus@gmail.com>wrote:
I have created the activechannels script as recommended in another post to export active calls so that they may be displayed in a NMS. This is basically a "fs_cli -x distinct_channels" However, is it possible to show channels for a particular tech prefix? Or rather put, what is the syntax for the fs_cli -x show channels like <999>. Whereas 999 would be the tech prefix. Am I on the right track for building the logic to show active calls per customer?
TGF
_______________________________________________ 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
participants (2)
-
Francis Trevor
-
Michael Collins