26 Jan
2016
26 Jan
'16
2:37 p.m.
For LUA it's (FS 1.6): api = freeswitch.API(); num_channels = api:executeString("show channels count"); digits = api:execute("regex", num_channels .. "|/([0-9]*)/|$1"); freeswitch.consoleLog("info", "num channels is: " .. digits .. "\n") to get the number of active channels. in Dialplan it could be done like this: <action application="set" data="foo=${regex(${show channels count}|/([0-9]*)/|%1)}"/> <action application="log" data="INFO foo: ${foo}" /> PS: If you only want outbound calls you could try: Show channels like external as command, you then however must have a sip profile that is only for outbound (in this case named external).