Getting GROUP_COUNT

Hi All. I inadvertently asked this question in “Asterisk General” not “Asterisk Support”:

“Is there a way I can call GROUP_COUNT or something like it via an AMI command?
I have been looking but cant seem to find anything, so I thought I would put this question on the forum as see if there is a way I can do it, or if anyone has any suggestions etc.”

David55 did in fact answer the question by saying “AMI treats functions the same as variables.”

I have had a bit of a Google but I must not be looking right. Can some give me a quick example of how I would do this for “GROUP_COUNT” as per David55’s answer ?

Thanks,Jeremy

Hi Jeremy,

Have you tried the Command Action?

Action: Command
Command: show function GROUP_COUNT([groupname][@category])

Thanks for the reply. I did try that but I got the error as follows:

No such command ‘show function GROUP_COUNT(blah)’

I then went to the Asterisk and tried it and got the same error.
I cant even see a “function” option in the results when you type help from CLI either :frowning:

Jeremy

sorry I take that back…you use “core” i.e.

cor show function GROUP_COUNT
however, that just returns the info about the GROUP_COUNT function.

i.e. this is the command then the result of calling it
localhost*CLI> core show function GROUP_COUNT(mm1)
No function by that name registered.
Command ‘core show function GROUP_COUNT(mm1)’ failed.

Jeremy

The function is called GROUP_COUNT, not GROUP_COUNT(mm1).

Thats correct David55 however as I mentioned if I call core show function GROUP_FUNCTION It returns the information about the function.
So I am not sure that this is what I need to do to get the count as I require.

Jeremy