Ticket #3496 (closed Feature Requests: fixed)

Opened 3 years ago

Last modified 2 years ago

FreePBX queue optimizations

Reported by: francesco_r Assigned to:
Priority: minor Milestone: 2.6
Component: Queues Version: 2.5-branch
Keywords: Cc:
Confirmation: Pending SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Asterisk with FreePBX gui is not a scalable call center solution. The dialparties.agi php script take many resources. And when you have many queues with dozen or hundred of members, dialparties.agi is called for each member of the queues and so the load goes high and the system become unstable. The main problem is that the asterisk queue subsystem don't know if a member is available or not when using local channels and so tries to dial all the members, always . With agents.conf and agentcallbacklogin the status is updated but this application is deprecated and in 1.6 is absent. So this is not a viable solution. But fortunately in 1.6 this deficiency was eliminated adding another variable to the queues: state_interface.
Basically with the state_interface asterisk is able to know the status of the real queue member, like chan_agent already do. So for example the SIP/2010 softphone with extension 2010 in queue.conf would be:

member=Local/2010@from-internal/n,0,,SIP/2010

And to manually add the extension 2010 as a member of the queue 600 we call:

exten => s,1,AddQueueMember(600,Local/2010@from-internal/n,,,SIP/2010)

With state_interface when i do 'show queue memebers' and the 2010 is on the phone, (also a call that is not passed in the queue, for example an outbound call), in the console you can see:

Local/2010@from-internal/n (In use) has taken 1 calls (last was 182 secs ago)

With this simple option the entire queue system become optimized and scalable. No additional resources or scripts to launch. All is managed by Asterisk.
Perhaps this feature will be also added to asterisk 1.4.24, you can see http://reviewboard.digium.com/r/116/ for more info.

So i think would be reasonable to add this in the queue module. Perhaps the best approach is to:

1) decide in the queue page if the agents/members of the queue are only locals or also remote phone (if are remote we cannot use the state_interface)

2) if are only locals check if asterisk is version > 1.6.0 (or we hope > 1.4.24)

3) if asterisk version is correct check in database what is the real device of the user and add the state_interface. It works only if one state_interface is defined, so with a tooltip advice that works only for the first extension.

4) if asterisk version is correct, with "Skip Busy Agents" write the more simple option "ringinuse=no" in queues_additional.conf

What do you think of this solution?

Change History

05/20/09 15:49:57 changed by p_lindheimer

  • confirmation changed from Unreviewed to Pending.

It looks like this is going to make it into 1.4.25+

the complication that comes in is that they are only supporting device states which is really too bad, as opposed to also supporting extension state (hints). I've discussed this with them and had a very positive initial discussion and have submitted this request:

https://issues.asterisk.org/view.php?id=15168

Let's see what happens with that, if it results in a good patch that can be back ported to 1.4, then it may be very straight forward to add much of this in.

05/25/09 15:05:48 changed by p_lindheimer

francesco_r,

have a look at https://issues.asterisk.org/view.php?id=15168 as I've had a first cut at a patch to enable the use of hints in Asterisk. My patch is for 1.4 svn but I suspect it will be able to be modified for 1.6 where it is most likely to make it in for real as they will probably consider it a feature request for 1.4. But for now, you can have a look on 1.4 and provide feedback as well as maybe some comments of encouragement on the Digium tracker to try and push the concept through (who knows, maybe even getting it put in 1.4 since they already 'pulled the trigger' making an exception to add what they did.

08/24/09 14:54:41 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [8126]) closes #3562 and closes #3496 requires Asterisk patch 15168