[asterisk-bugs] [Asterisk 0012127]: Using state_interface and Local channels allows several simultenous calls to be sent to agent

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Mar 3 15:41:25 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12127 
====================================================================== 
Reported By:                atis
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   12127
Category:                   Applications/app_queue
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 103809 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             03-03-2008 12:26 CST
Last Modified:              03-03-2008 15:41 CST
====================================================================== 
Summary:                    Using state_interface and Local channels allows
several simultenous calls to be sent to agent
Description: 
I've seen this situation on 8-CPU 3GHz Xeon, that agent gets 4 queue calls
simultaneously. 

For now i've been able to avoid this by checking/setting group at
beginning of Local channel, setting call-limit=1 for SIP peers (only for
those who shouldn't receive more than 1 call simultaneously) and checking
group upon unsuccessful Dial from Local channel. Those 3 fixes together are
giving some good results for one most-problematic queue, however that's not
a permanent and stable solution. If queue is creating several channels at
the same time, on slower but multi-cored systems this could lead to race
condition between GROUP_COUNT and Set(GROUP()) in two parallel channels,
and call-limit=1 also can't always be set.

I'm not sure if this can be implemented in good way, but I think the most
appropriate solution for this would be that Queue is setting device state
of Local channel, and other queue(s) (if member is in multiple queues)
receives event from first queue's devicestate change.

My system is Asterisk 1.4.14 with backported state_interface from r103809
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 03-03-08 15:41  
---------------------------------------------------------------------- 
It wouldn't be very difficult to program the member's status in app_queue
to change to "ringing" as soon as the call is placed. The problem is that
the state_interface mechanism was programmed in an open-ended way such that
people could use it for whatever means they want. For instance,
administrators can  have a SIP device specified as the member's interface
and a completely different SIP device specified as the state_interface if
they desire. What I'm getting at is that it's not wise for app_queue to try
to guess what you're attempting to accomplish when specifying a
state_interface for a queue member.

Having said that, I believe that use of the DEVICE_STATE dialplan function
to set a custom device state would be the best way to handle this problem.
I realize that you are using a backport of the state_interface mechanism in
1.4 (for which state_interface is not supported), which means that you
don't have the DEVICE_STATE function. The use of DEVICE_STATE was kept in
mind for people who may have situations like this one (where the local
channel may take a measurable amount of time before dialling the end
device) or in situations where the local channel specified may call one of
many different end devices.

Since this situation is handleable in the dialplan, I will go ahead and
close this. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-03-08 15:41  putnopvut      Note Added: 0083302                          
======================================================================




More information about the asterisk-bugs mailing list