Summary:ASTERISK-20245: Asterisk manager output for command "Action:queues" is inconsistent from other commands.
Reporter:Ron Gage (rongage)Labels:
Date Opened:2012-08-16 12:42:51Date Closed:2017-12-12 19:30:36.000-0600
Versions: Frequency of
Environment:FreePBX based on CentOS 5.8 finalAttachments:
Description:This is reference the management interface over TCP/5038

With the apparent sole exception of the "Action:queues" command, every command that returns data does so in a key:value format.  For example - an excerpt from the Action:SipPeers command:

Event: PeerEntry
Channeltype: SIP
ObjectName: 213
ChanObjectType: peer
IPport: 5060
Dynamic: yes
Forcerport: no
VideoSupport: no
TextSupport: no
ACL: yes
Status: OK (3 ms)
RealtimeDevice: no

With the Action:Queues command, you get an entirely different (and much harder to parse) format:

0157 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:1, SL:0.0% within 300s
     Ron (Local/200@from-queue/n) (dynamic) (Not in use) has taken no calls yet
  No Callers

default has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
  No Members
  No Callers

Please either fix the Queues command to provide an output consistent with other commands in the AMI or provide a method to toggle the output format of this command.
Comments:By: Matt Jordan (mjordan) 2012-08-23 16:07:39.100-0500

Normally this would be a feature request, as its an improvement to an already existing feature.  That would mean that it would require a patch in order to live on the issue tracker.

As it is, lets face it: this is pretty stupid.  The queue information should come back in standard AMI event form.  However, since modifying the return of this command would be a breaking change, this can only happen in Asterisk trunk, and it'd be best if it was done in conjunction with some other AMI changes such that when we bump the AMI version, we do so for a large number of legitimate reasons.

By: Ron Gage (rongage) 2012-08-23 17:50:02.513-0500

That is why I suggested a switch be implemented that would toggle between the current output format and a key:value format.  The current output format (obviously) being the default format.  At next AMI revision, the behavior can change or even stick with the key:value format.

I would think this would be a great way to introduce the new format while minimizing breakage.


By: Corey Farrell (coreyfarrell) 2017-12-12 19:30:36.215-0600

It looks like AMI "Action: Queues" no longer exists in Asterisk 15+.