[asterisk-bugs] [JIRA] (ASTERISK-19368) Queue penalty only work when QUEUE_MIN_PENALTY == QUEUE_MAX_PENALTY
Robert Verspuy (JIRA)
noreply at issues.asterisk.org
Tue Dec 4 09:13:45 CST 2012
[ https://issues.asterisk.org/jira/browse/ASTERISK-19368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200389#comment-200389 ]
Robert Verspuy edited comment on ASTERISK-19368 at 12/4/12 9:13 AM:
--------------------------------------------------------------------
The problem lies in calc_metric in apps/app_queue.c.
Example: We have 3 phones: agent 201 (penalty 1), 202 (penalty 2) and 203 (penalty 3).
Rules: After 15 seconds, raise penalty_max to 2, after 30 seconds raise penalty_max to 3.
What do we want:
when a call comes in, agent 201 must ring for 15 seconds. Then agent 201 and agent 202 must ring, and 15 seconds later, all three phones must ring.
Strategy is ringall, we do not want autopause.
When one call comes in, agent 201 ring, everything ok. Then the penalty max is raised to 2. This should make agent 201 and 202 ring, because we have a min_penalty of 1 and a max_penalty of 2. But only agent 201 rings.
In calc_metrics, when using strategy ringall a tmp_metric is calculated based on member penalty * 1000000 * usepenalty (=1 in our case).
When debugging I saw that agent 201 and agent 202 must be ringing, but because of the tmp_metric is different for both agents, only agent 201 rings (lowest metric).
My workaround for our case is to remove the line 'tmp->metric = mem->penalty * 1000000 * usepenalty' in that function.
And then all agents between the min and max penalty values, are all ringing together, and not based on their own penalty values.
was (Author: exarv):
The problem lies in calc_metric in apps/app_queue.c.
Example: We have 3 phones: agent 201 (penalty 1), 202 (penalty 2) and 203 (penalty 3).
Rules: After 15 seconds, raise penalty_max to 2, after 30 seconds raid penalty_max to 3.
What do we want:
when a call comes in, agent 201 must ring for 15 seconds. Then agent 201 and agent 202 must ring, and 15 seconds later, all three phones must ring.
Strategy is ringall, we do not want autopause.
When one call comes in, agent 201 ring, everything ok. Then the penalty max is raised to 2. This should make agent 201 and 202 ring, because we have a min_penalty of 1 and a max_penalty of 2. But only agent 201 rings.
In calc_metrics, when using strategy ringall a tmp_metric is calculated based on member penalty * 1000000 * usepenalty (=1 in our case).
When debugging I saw that agent 201 and agent 202 must be ringing, but because of the tmp_metric is different for both agents, only agent 201 rings (lowest metric).
My workaround for our case is to remove the line 'tmp->metric = mem->penalty * 1000000 * usepenalty' in that function.
And then all agents between the min and max penalty values, are all ringing together, and not based on their own penalty values.
> Queue penalty only work when QUEUE_MIN_PENALTY == QUEUE_MAX_PENALTY
> -------------------------------------------------------------------
>
> Key: ASTERISK-19368
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-19368
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_queue
> Affects Versions: 1.8.8.2
> Reporter: Avraam David
> Severity: Minor
> Attachments: d1
>
>
> I have a queue with two groups of members with different penalty, Should work with queueruls.conf or autofill = yes.
>
> If QUEUE_MIN_PENALTY is not equal to QUEUE_MAX_PENALTY, member on second group can't received calls.
> exten => s,n,Set(QUEUE_MIN_PENALTY=1)
> exten => s,n,Set(QUEUE_MAX_PENALTY=2)
> or
> queuerules.conf
> [qrule]
> penaltychange => 10,1,0
> penaltychange => 21,2,0
> Not works.
> work only
> exten => s,n,Set(QUEUE_MIN_PENALTY=1)
> exten => s,n,Set(QUEUE_MAX_PENALTY=1)
> or
> queuerules.conf
> [qrule]
> penaltychange => 10,1,1
> penaltychange => 20,2,2
> also if not defined min penalty on queuerules.conf penaltychange like
> penaltychange => 20,2
> not works, only if set same parameters on penaltychange line MIN and MAX
> penaltychange => 20,2,2
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list