If you issue the command “Action: QueueStatus” in the Asterisk AMI, you get a pretty little report showing the summary of the queue and the agents in them and their status, like this:
...
Event: QueueMember
Queue: test_queue
Name: IAX2/testing
Location: IAX2/testing
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 6
Paused: 0
among other things…
As you can see it shows a very useful status for the endpoint (device), like Status: 6, however the voip-info site does not tell you what 4 and 8 are. Im getting 8 appearing in a queue all the time so i suspect it something common.
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+QueueStatus
from voip-info:
[quote]Status numbers explanation
1 - Not in Use
2 - In Use
3 - Busy
4 -
5 - Unavailable
6 - Ringing[/quote]
The Asterisk documents: https://wiki.asterisk.org/wiki/display/AST/Function_DEVICE_STATE explain that the device states are:
UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | RINGINUSE | ONHOLD
however if i enumerate these, or even these:
http://www.asterisk.org/doxygen/asterisk1.4/devicestate_8c.html
They don’t seem to correspond to the known ones, so i think they are unrelated.
Can someone please publish the full and complete list of the status codes. (Asterisk 1.8, for me and any other version for anyone else who is interested)
Wrong doxygen file. The device states are in:
asterisk.org/doxygen/asteris … ource.html
As it is quicker to find them in the actual source, for the 1.8 branch version it is:
svn.digium.com/svn/asterisk/bran … icestate.h
[code]/*! \brief Device States
/
enum ast_device_state {
AST_DEVICE_UNKNOWN, /!< Device is valid but channel didn’t know state /
AST_DEVICE_NOT_INUSE, /!< Device is not used /
AST_DEVICE_INUSE, /!< Device is in use /
AST_DEVICE_BUSY, /!< Device is busy /
AST_DEVICE_INVALID, /!< Device is invalid /
AST_DEVICE_UNAVAILABLE, /!< Device is unavailable /
AST_DEVICE_RINGING, /!< Device is ringing /
AST_DEVICE_RINGINUSE, /!< Device is ringing and in use /
AST_DEVICE_ONHOLD, /!< Device is on hold /
AST_DEVICE_TOTAL, // Total num of device states, used for testing */
};[/code]
Just change the branch number, for any other branch, or use tags/ for spot versions.
Ah, i see my mistake, Google was taking me to the 1.4 trunk.
So, to enumerate the codes, and thereby complete the template:
Status numbers explanation
0 - [color=#800000]Unknown[/color] [color=#0000FF](Device is valid but channel didn’t know state)[/color]
1 - Not in Use [color=#0000FF](Device is not used)[/color]
2 - In Use [color=#0000FF](Device is in use)[/color]
3 - Busy [color=#0000FF](Device is busy)[/color]
4 - [color=#800000]Invalid[/color] [color=#0000FF](Device is invalid)[/color]
5 - Unavailable [color=#0000FF](Device is unavailable)[/color]
6 - Ringing [color=#0000FF](Device is ringing)[/color]
7 - In Use Ringing [color=#0000FF](Device is ringing and in use)[/color]
8 - [color=#800000]On Hold[/color] [color=#0000FF](Device is on hold)[/color]