[asterisk-bugs] [Asterisk 0014650]: leavewhenempty=yes doesn't work as expected, operates in reverse.
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Apr 23 12:47:18 CDT 2009
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14650
======================================================================
Reported By: alecdavis
Assigned To: mmichelson
======================================================================
Project: Asterisk
Issue ID: 14650
Category: Applications/app_queue
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Asterisk Version: SVN
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 181371
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-03-12 04:09 CDT
Last Modified: 2009-04-23 12:47 CDT
======================================================================
Summary: leavewhenempty=yes doesn't work as expected,
operates in reverse.
Description:
With 'leavewhenempty=yes' and 'timeout=15' in queues.conf
When the last agent logs out of a queue while a call is waiting in the
queue, I'd expect the call to drop out of the queue with
QUEUESTATUS=LEAVEEMPTY after 15 seconds, but instead app_queue exits with
QUEUESTATUS=TIMEOUT after the full timeout (60 seconds as specified in the
dialplan).
App_queue only seems drop out if the queue early (15s) when
'leavewhenempty=no', also note, the agent's phone keeps ringing until the
timeout of 15s is reached.
After a reload of queue below (with small patch @line 1502 applied to show
q->leavewhenempty value), you can see that the 'value=yes' but the
'q->leavewhenempty=0'
CLI> queue reload all
[Mar 12 21:24:20] NOTICE[19248]: app_queue.c:5545 reload_queue_rules:
queuerules.conf has not changed since it was last loaded. Not taking any
action.
== Parsing '/etc/asterisk/queues.conf': == Found
== Parsing '/etc/asterisk/queues/chch_queue.conf': == Found
[Mar 12 21:24:20] WARNING[19248]: app_queue.c:1502 queue_set_param:
leavewhenempty 'chch_queue': leavewhenempty at line 202 of queues.conf
value=yes, q->leavewhenempty=0
And when 'leavewhenempty=no';
CLI> queue reload all
chch1*CLI> queue reload all
[Mar 12 21:46:06] NOTICE[19519]: app_queue.c:5545 reload_queue_rules:
queuerules.conf has not changed since it was last loaded. Not taking any
action.
== Parsing '/etc/asterisk/queues.conf': == Found
== Parsing '/etc/asterisk/queues/chch_queue.conf': == Found
[Mar 12 21:46:06] WARNING[19519]: app_queue.c:1502 queue_set_param:
leavewhenempty 'chch_queue': leavewhenempty at line 202 of queues.conf
value=no, q->leavewhenempty=35
chch1*CLI>
It seems as though
parse_empty_options(val, &q->leavewhenempty);
is getting it wrong, but someone that know this code, better change it as
they'll better understand the impact of the change.
======================================================================
----------------------------------------------------------------------
(0103708) svnbot (reporter) - 2009-04-23 12:47
http://bugs.digium.com/view.php?id=14650#c103708
----------------------------------------------------------------------
Repository: asterisk
Revision: 190253
_U branches/1.6.2/
U branches/1.6.2/apps/app_queue.c
------------------------------------------------------------------------
r190253 | mmichelson | 2009-04-23 12:47:17 -0500 (Thu, 23 Apr 2009) | 15
lines
Merged revisions 190250 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r190250 | mmichelson | 2009-04-23 12:45:35 -0500 (Thu, 23 Apr 2009) | 9
lines
Fix reversed behavior of leavewhenempty option in queues.conf.
(closes issue http://bugs.digium.com/view.php?id=14650)
Reported by: alecdavis
Patches:
14650.patch uploaded by mmichelson (license 60)
Tested by: mmichelson, lmadsen
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=190253
Issue History
Date Modified Username Field Change
======================================================================
2009-04-23 12:47 svnbot Checkin
2009-04-23 12:47 svnbot Note Added: 0103708
======================================================================
More information about the asterisk-bugs
mailing list