[asterisk-bugs] [Asterisk 0017471]: "joinempty = ringing" doesn't work

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Jun 6 05:52:37 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17471 
====================================================================== 
Reported By:                jazzy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17471
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.9-rc1 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-06-05 06:28 CDT
Last Modified:              2010-06-06 05:52 CDT
====================================================================== 
Summary:                    "joinempty = ringing" doesn't work
Description: 
I want to prevent placing a call to a queue when all members are busy or
unavailable. A caller is placed to a queue despite "joinempty = ringing"
setting and the fact that the members' phone is already ringing.
Tested under Ubuntu 10.04 LTS with fresh install and asterisk 1.6.2.5 from
ubuntu packages.
Other settings of joinempty parameter work fine (unavailable, inuse).
Only few changes to the default configuration was made to reproduce this
bug:


In sip.conf:

callcounter = yes

[1001]
type=friend
secret=1001
host=dynamic

[1002]
type=friend
secret=1002
host=dynamic

[1003]
type=friend
secret=1003
host=dynamic


In extensions.conf inside default context:

exten => 1001,1,Dial(SIP/1001)
exten => 1002,1,Dial(SIP/1002)
exten => 1003,1,Dial(SIP/1003)
exten => 1004,1,Queue(operators)
exten => 1004,n,Hangup()


In queues.conf:

[operators]
joinempty = unavailable,inuse,ringing
member => SIP/1003


Then call from 1001 to 1003 and while it's ringing, call from 1002 to
1004. The call will be placed to the queue.
====================================================================== 

---------------------------------------------------------------------- 
 (0123027) jazzy (reporter) - 2010-06-06 05:52
 https://issues.asterisk.org/view.php?id=17471#c123027 
---------------------------------------------------------------------- 
I looked into app_queue.c source code (get_member_status function) and
found that the ringing functionality is not implemented. Here is the
trivial patch to resolve this issue.

--- app_queue.c.orig	2010-05-25 21:06:04.000000000 +0400
+++ app_queue.c	2010-06-06 11:38:28.000000000 +0400
@@ -977,6 +977,11 @@
 				ast_debug(4, "%s is unavailable because his device state is
'inuse'\n", member->membername);
 				break;
 			}
+		case AST_DEVICE_RINGING:
+			if (conditions & QUEUE_EMPTY_RINGING) {
+				ast_debug(4, "%s is unavailable because his device state is
'ringing'\n", member->membername);
+				break;
+			}
 		case AST_DEVICE_UNKNOWN:
 			if (conditions & QUEUE_EMPTY_UNKNOWN) {
 				ast_debug(4, "%s is unavailable because his device state is
'unknown'\n", member->membername); 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-06 05:52 jazzy          Note Added: 0123027                          
======================================================================




More information about the asterisk-bugs mailing list