-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app_queue: Allow queue strategy to be manipulated externally. #686
base: master
Are you sure you want to change the base?
Conversation
This adds the concept of "queue strategy providers" to interface with app_queue, which allows queue strategy logic to be implemented external to app_queue. This adds some simple hooks to app_queue to facilitate this, so that all other logic can be done in a separate module that registers with app_queue. Resolves: asterisk#685
cherry-pick-to: 18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like and looks like an implementation to fit your specific needs scoped specifically for that. For example:
- Only a single strategy provider is supported
- Since only a single strategy provider is supported, no configuration on a per-queue basis for it
- No ability by the provider to store state
I require other people to provide input on this as to whether it is something they would use and meets their own needs before further reviewing for inclusion. If input is not received from others, I will not accept this.
Per your recommendation, I tried to simplify the changes in app_queue as much as possible with the idea that this sort of thing could be handled in the other module, to avoid adding complexity in app_queue itself. The other module could support multiple other mechanisms, etc. Would you prefer that all be handled in app_queue directly?
What do you mean by the provider storing state, exactly? The state would be in the other module, no? |
And it would be associated to queues and callers... how? My requirement still stands regardless. |
Interesting, do you think it's possible to implement another strategy like skills based routing. We have an old patch for that and if it possible to switch it as a module instead of patching Asterisk it could be great for the maintenance and distribution. |
Yeah, the idea would be that things like that can be facilitated "externally" - so that could be implemented in or interact with the external strategy module. The idea is to make that kind of thing easier by having a defined mechanism for custom stuff so app_queue doesn't need to be patched anymore to do that stuff. This patch does not aim to implement any strategy itself, but do you think the info exposed would facilitate implementing the strategy you have in mind? |
We discussed in 2011 to include this patch (https://github.com/wazo-platform/asterisk/blob/master/debian/patches/xivo_skill_queues) to Asterisk, but finally it was to big and nobody wanted to maintain it at Digium. Instead to have this patch we could convert it to a module for app_queue strategy and also probably easier to have more people in the community to use it easier. There is also some issue for linear strategy, you need to restart the module to apply it correctly, so maybe we this kind of feature we could create something. Another idea, AI based routing ;). I know the best way is to create your own queue with ARI, but it's quite long to reproduce all settings and for the moment it's not an option. |
Yeah, that's exactly the motivation behind this patch - still use app_queue, but use your own algorithms for routing. So this is exactly the kind of thing it would aim to facilitate - skill based, AI, etc., and app_queue itself wouldn't need to be changed to do that. The linear thing sounds like a separate bug, which this would not address. |
Yes |
It looks like it would be straight-forward to have multiple external strategy providers that registered by name so that you can just use the standard That being said I would be interested in seeing an example external strategy implementation? Could you re-implement one of the existing strategies with it? I think that would be a useful demo. |
This adds the concept of "queue strategy providers" to interface with app_queue, which allows queue strategy logic to be implemented external to app_queue. This adds some simple hooks to app_queue to facilitate this, so that all other logic can be done in a separate module that registers with app_queue.
Resolves: #685