At approx line 3578 in mod_commands.c you have this:<div><br></div><div><div>sprintf(sql,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;select * from channels where hostname=&#39;%s&#39; and uuid like &#39;%s&#39; or name like &#39;%s&#39; or cid_name like &#39;%s&#39; or cid_num like &#39;%s&#39; order by created_epoch&quot;,</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>hostname, argv[2], argv[2], argv[2], argv[2]);</div><div><br></div><div>So the five fields that the &#39;like&#39; param includes are:</div><div>hostname</div>
<div>uuid</div><div>name (that is, channel name)</div><div>cid_name</div><div>cid_num</div><div><br></div><div>So in theory you can do something like this:</div><div>show channels like sofia</div><div>or</div><div>show channels like freetdm</div>
<div>or</div><div>show channels like loopback</div><div><br></div><div>It&#39;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. </div>
<div><br></div><div>What is the ultimate output format that you are wanting?</div><div>-MC</div><br><div class="gmail_quote">On Thu, Nov 25, 2010 at 10:17 PM, Francis Trevor <span dir="ltr">&lt;<a href="mailto:fiberhaus@gmail.com">fiberhaus@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">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 &quot;fs_cli -x distinct_channels&quot;  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 &lt;999&gt;. Whereas 999 would be the tech prefix. Am I on the right track for building the logic to show active calls per customer?<br>

<br>TGF<br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>