[Asterisk-Users] Asterisk Management API

Ken Godee ken at perfect-image.com
Tue Mar 8 10:35:11 MST 2005


Umar Sear wrote:

> Hi all, 
> 
> I am trying to write an application to monitor queues using the
> Asterisk Management API.
> 
> So far I have had some level of sucess, basically reverse engineering
> the protocol and the event messages using ethereal etc.
> 
> I know there are a couple of pages on the Wiki that attempt (no
> dis-respect to who ever did it as it has been a great help)  to
> document the API and was wondering if there is more information
> available.
> 
> Any pointers will be greatly appreciated. I hope to document my
> findings on the Wiki once I have definative information.
> 
> Thanks
> 
> Umar

Not sure what your looking for but you can just parse
the output of the following commands
"show queues","show agents"  ie....

======================
Action: command
Command: show queues
======================

Response: Follows
jrq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:137, A:0, SL:50.4% within 0s
    Members:
       Agent/3041 has taken 137 calls (last was 10 secs ago)
    No Callers

mwq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:127, A:0, SL:44.9% within 0s
    Members:
       Agent/3042 has taken 127 calls (last was 68 secs ago)
    No Callers

shq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3006 has taken no calls yet
    No Callers

rgq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3009 has taken no calls yet
    No Callers

bfq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/1978 has taken no calls yet
    No Callers

erq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3033 has taken no calls yet
    No Callers

dwq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:39, A:0, SL:51.3% within 0s
    Members:
       Agent/3007 has taken 39 calls (last was 4234 secs ago)
    No Callers

dhq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:87, A:0, SL:50.6% within 0s
    Members:
       Agent/3011 has taken 87 calls (last was 219 secs ago)
    No Callers

mgq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3025 has taken no calls yet
    No Callers

joq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3028 has taken no calls yet
    No Callers

lsq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:106, A:0, SL:41.5% within 0s
    Members:
       Agent/3017 has taken 106 calls (last was 12 secs ago)
    No Callers

dmq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/3010 has taken no calls yet
    No Callers

sgq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:57, A:0, SL:50.9% within 0s
    Members:
       Agent/3008 has taken 57 calls (last was 4797 secs ago)
    No Callers

bcq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/1674 has taken no calls yet
    No Callers

thq          has 0 calls (max 1) in 'ringall' strategy (0s holdtime), 
C:0, A:0, SL:0.0% within 0s
    Members:
       Agent/181 has taken no calls yet
    No Callers

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

--END COMMAND--


======================
Action: command
Command: show agents
======================

Response: Follows
181          (Tom Hill) not logged in (musiconhold is 'none')
1674         (Bill Carron) not logged in (musiconhold is 'none')
3011         (Danny Harrington) logged in on Zap/4-1 is idle 
(musiconhold is 'none')
3028         (Justin Orstad) not logged in (musiconhold is 'none')
3025         (Mike Gaglio) not logged in (musiconhold is 'none')
3007         (Derrick Wilson) not logged in (musiconhold is 'none')
3008         (Steven Greenlaw) not logged in (musiconhold is 'none')
3033         (Eric Ryan) not logged in (musiconhold is 'none')
1978         (Bill Fornville) not logged in (musiconhold is 'none')
3006         (Saba Horton) not logged in (musiconhold is 'none')
3009         (Rob Giannina) not logged in (musiconhold is 'none')
3041         (John Rowley) logged in on Zap/16-1 talking to Zap/41-1 
(musiconhold is 'none')
3042         (Michelle Wilson) logged in on Zap/15-1 is idle 
(musiconhold is 'none')
3017         (Laura Sood) logged in on Zap/2-1 is idle (musiconhold is 
'rock1')
3010         (David McBrayer) not logged in (musiconhold is 'rock1')
--END COMMAND--











More information about the asterisk-users mailing list