System: Asterisk 20
I’m trying to give certain queue members priority using the ringall strategy and penalties.
Queue has two members, A and B.
A has a penalty of 0.
B has a penalty of 10.
When someone calls I first want A to ring and if they time out after some time, 10 seconds for instance, I want it to stop ringing A and start ringing B.
I believe this would result in the same behavior as using the linear strategy but that strategy doesn’t seem to work nicely with realtime. If it does and I should simply consider switching to it I’d love to hear it too.
From what I understand I should have the QUEUE_MIN_PENALTY and QUEUE_MAX_PENALTY both at 0 at the start and change them to both be 10 after time has passed.
The configuration that I’m using to try and achieve this:
Queue in database:
| name | timeout | ringinuse | announce_frequency | announce_position | strategy | joinempty | leavewhenempty | defaultrule | | queue | 10 | no | 60 | yes | ringall | strict | strict | myrule |
The queue has been verified to work when I’m not trying to use penalties
[myrule] penaltychange =>30,10,10
exten => _X,1,Answer(PJSIP/SoftPhoneMobile) same => n, Set(QUEUE_MAX_PENALTY=0) same => n, Set(QUEUE_MIN_PENALTY=0) exten => 8,4,Queue(queue)
Using queue show queue I get the following:
queue show queue queue has 0 calls (max unlimited) in 'ringall' strategy (66s holdtime, 1s talktime), W:0, C:66, A:3, SL:0.0%, SL2:1.4% within 0s Members: PJSIP/direct with penalty 10 (ringinuse disabled) (dynamic) (Not in use) has taken 4 calls (last was 6302 secs ago) (login was 70543 secs ago) PJSIP/queue (ringinuse disabled) (dynamic) (Not in use) has taken 10 calls (last was 317 secs ago) (login was 70572 secs ago) No Callers
So the penalty for “direct” (B in the example) was applied correctly
And when I do queue show rules:
queue show rules Rule: myrule After 30 seconds, adjust QUEUE_MAX_PENALTY to 10, adjust QUEUE_MIN_PENALTY to 10 and adjust QUEUE_RAISE_PENALTY by 0
So the “myrule” rule has been parsed correctly and I don’t overrule it (default for the queue) in the dialplan.
When I try to call I see all dialplan steps happened in CLI but I never see any console output that the rule takes effect. Should I have seen this?
I’m probably missing something very simple but I don’t see it. Could someone please explain what I’m missing?