I would like to use some out put from core show channels count in a dial plan variable.
1 active channels
1 active calls
4 calls processed
I can’t see a dedicated dialplan variable which shows me active channels. Is there a way to execute an asterisk cli command from the dialplan and set the results as a dialplan variable?
create a AGI with three variables phone_number,start_time and end_time at the beginning of the dialplan call this agi which will update the mysql with phone_number and start_time but end_time as null.
now at hangup i.e(h exten)u will call the same agi to update the mysql with end_time
now when you select count the DATABASE with end_time as NULL you will get all the active calls and store the result in AGI variable and call the variable as per you requirement in the dialplan . now other parameters you can get mathematically in the same dialplan…
Initial investigation looks like I may have to use the set command to set a returned agi response.
What I was looking to do is have the dialplan have some knowledge of the current number of calls from a capacity point of view and maybe react in some way.
For example if there are 50 active calls I may like to say to the 51st caller that there are already 50 calls in progress. Perhaps they would like to call back.
I may want to run a script based on high capacity.
I identified the asterisk command line returned the current number of active channels but can’t find an alternative dialplan variable.
If all you want to do is [quote]For example if there are 50 active calls I may like to say to the 51st caller that there are already 50 calls in progress. Perhaps they would like to call back.[/quote] then use group count and count the incoming and outgoing calls.
Thats fine but it is system wide and not fine grained to specific queues and will also include incoming and outgoing, Groupcount that I pointed out earlier lets you count different queues and different types of calls. So is more scalable