[asterisk-bugs] [Asterisk 0014650]: leavewhenempty=yes doesn't work as expected, operates in reverse.

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Mar 23 12:25:30 CDT 2009


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=14650 
====================================================================== 
Reported By:                alecdavis
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   14650
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 181371 
Request Review:              
====================================================================== 
Date Submitted:             2009-03-12 04:09 CDT
Last Modified:              2009-03-23 12:25 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.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-03-23 12:25 lmadsen        Assigned To              mmichelson => lmadsen
======================================================================




More information about the asterisk-bugs mailing list