[Home]

Summary:ASTERISK-06829: QueueStatusComplete not being returned properly
Reporter:Blaz Ziherl (bziherl)Labels:
Date Opened:2006-04-22 12:09:15Date Closed:2006-05-08 08:39:44
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) putty.log
Description:Sometimes Manager API doesn't properly return QueueStatusComplete event. The text itself ("Event: QueueStatusComplete") is returned as part of a previous event, or even replaces text of the previous event. This behaviour can always be reproduced in the following way:

- Define cca. 20 queues with 60 agents in each
- Create simple client application that will send "Action: queuestatus" action every 5 seconds or so

In a matter of few minutes, the described behaviour will occur. I have successfully reproduced this behaviour on many Asterisk servers, with 10Mbps, 100Mbps, and 1Gbps network connections.

****** ADDITIONAL INFORMATION ******

This is one example of how the event is sometimes returned (in this case there is a missing empty line between QueueMember and QueueStatusComplete event):

Event: QueueMember
Queue: 01
Location: Agent/01067
Membership: static
Penalty: 3
CallsTaken: 0
LastCall: 0
Status: 4
Paused: 0
ActionID: 1Event: QueueStatusComplete
ActionID: 1

---------
This is another example, where previous event was replaced by the QueueStatusComplete:

Event: QueueMember
Queue: 01
Location: Agent/01067
MembershiEvent: QueueStatusComplete
ActionID: 1
Comments:By: Blaz Ziherl (bziherl) 2006-05-04 03:33:30

Is it possible that this piece of code (in app_queue.c):

ast_mutex_unlock(&qlock);
ast_cli(s->fd,
"Event: QueueStatusComplete\r\n"
"%s"
"\r\n",idText);

return RESULT_SUCCESS;

Should be changed into this (as originally posted in http://bugs.digium.com/view.php?id=4694 but different from code in Asterisk 1.2.4, 1.2.6 and 1.2.7.x):

ast_mutex_unlock(&qlock);
ast_mutex_lock(&s->lock);
ast_cli(s->fd,
"Event: QueueStatusComplete\r\n"
"%s"
"\r\n",idText);
ast_mutex_unlock(&s->lock);
return RESULT_SUCCESS;

???



By: Serge Vecher (serge-v) 2006-05-04 08:35:05

bziherl: did you try the patch in 4694 to see if it fixes the issue?

Also, please, if possible, submit as an attachment a console log that illustrates the issue. Thanks.

By: Alex Richardson (alexrch) 2006-05-07 11:28:33

I have a similar problem as well. I have problems with all Manager events. I have attached a telnet log (check line 7522 for example).

By: BJ Weschke (bweschke) 2006-05-08 08:39:43

Change made to 1.2 and /trunk. Should fix it. Please let us know. Thanks!