<div dir="ltr">Well i want that info in my php script running on xampp server to show how many calls are currently taking place in freeswitch and what i can do max to know is communicate to freeswitch through socket 8021 and then run some script like of lua and expect lua script to return me that info.<br><br><br><br><br><br><br><div class="mt-signature"><font color="#999999" class="mt-signature-text">Sent with <a href="https://mailtrack.io/install?source=signature&lang=en&referral=randhawaay@gmail.com&idSignature=22" class="mt-install">MailTrack</a></font></div><img width="0" height="0" class="mailtrack-img" src="https://mailtrack.io/trace/mail/f22dcbd2120c3869fb63a3629e7611ff337e8902326470.png"></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 27, 2016 at 12:24 AM, Brian West <span dir="ltr"><<a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What exactly was the original issue that was trying to be resolved that required the session count?</div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 10:03 AM, Marcel Haldemann <span dir="ltr"><<a href="mailto:marcel.haldemann@convercom.ch" target="_blank">marcel.haldemann@convercom.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">small correction for my previous answer:<br>
<br>
For "outbound" only channels the command would have to be like:<br>
<br>
Show channels count like external<br>
<br>
What would result in:<br>
<br>
api = freeswitch.API();<br>
filter = " like external"; -- set this as needed or let empty for no filter<br>
num_channels = api:executeString("show channels count" .. filter);<br>
<span>digits = api:execute("regex", num_channels .. "|/([0-9]*)/|$1");<br>
</span>freeswitch.consoleLog("info", "num channels is: " .. digits .. "\n");<br>
<br>
as already mentioned this would expect a profile for outbound calls "only", called external.<br>
More info about the filter see here:<br>
<a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_commands" rel="noreferrer" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/mod_commands</a> and search for "show channels"<br>
This applys to FreeSwitch 1.6/1.7<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] Im Auftrag von Marcel Haldemann<br>
Gesendet: Dienstag, 26. Januar 2016 15:38<br>
<span>An: FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>
Betreff: Re: [Freeswitch-users] DETECT ACTIVE CHANNELS<br>
<br>
</span><div><div>For LUA it's (FS 1.6):<br>
api = freeswitch.API();<br>
num_channels = api:executeString("show channels count");<br>
digits = api:execute("regex", num_channels .. "|/([0-9]*)/|$1");<br>
freeswitch.consoleLog("info", "num channels is: " .. digits .. "\n")<br>
<br>
to get the number of active channels.<br>
<br>
<br>
in Dialplan it could be done like this:<br>
<br>
<action application="set" data="foo=${regex(${show channels count}|/([0-9]*)/|%1)}"/><br>
<action application="log" data="INFO foo: ${foo}" /><br>
<br>
<br>
PS: If you only want outbound calls you could try:<br>
<br>
Show channels like external<br>
<br>
as command, you then however must have a sip profile that is only for outbound (in this case named external).<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">
<p><font face="courier new, monospace"><b><i><font size="4">Brian West</font></i></b><br><span style="font-size:x-small"><a href="mailto:brian@freeswitch.org" target="_blank">brian@freeswitch.org</a></span></font></p>
<p><font size="1" face="courier new, monospace"><img src="http://billing.freeswitch.org/templates/default/img/whmcslogo.png"><br></font></p><p><font size="2" face="monospace, monospace"><b><i>Twitter: @FreeSWITCH , @briankwest</i></b><br><a href="http://www.freeswitchbook.com" target="_blank">http://www.freeswitchbook.com</a><br><a href="http://www.freeswitchcookbook.com" target="_blank">http://www.freeswitchcookbook.com</a></font></p><p><font face="monospace, monospace">Got Bugs? Report them <a href="https://freeswitch.org/jira" target="_blank">here</a>! | Reddit: <a href="https://www.reddit.com/r/freeswitch" target="_blank">/r/freeswitch</a></font></p>
<p><font size="2" face="monospace, monospace"><b>T:</b><a href="tel:%2B19184209001" value="+19184209001" target="_blank">+19184209001</a> | <b>F:</b><a href="tel:%2B19184209002" value="+19184209002" target="_blank">+19184209002</a> | <b>M:</b>+1918424WEST (9378)<br><b>iNUM:</b>+883 5100 1420 9001 | <b>ISN:</b>410*543 | <b>Skype:</b>briankwest</font></p></div></div></div></div></div></div></div></div></div></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>