[asterisk-bugs] [JIRA] (ASTERISK-27017) app_queue: Linear queue retries as many agents as were skipped

Jared Hull (JIRA) noreply at issues.asterisk.org
Tue Aug 22 11:52:08 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238170#comment-238170 ] 

Jared Hull commented on ASTERISK-27017:
---------------------------------------

try_calling() increments 'tries' before setting up a call attempt, then it looks for a member to dial.
It doesn't attempt the unavailable or paused members, nor does it count them towards the 'tries'.
This is why it is ringing the same members until 'tries' is greater than or equal to the member count.

tries=0
{quote}app_queue.c: PJSIP/108-00000005 is trying to call a queue member.
app_queue.c: Trying 'PJSIP/107' with metric 0
app_queue.c: PJSIP/107 not available, can't receive call
app_queue.c: Trying 'PJSIP/108' with metric 1
app_queue.c: PJSIP/108 paused, can't receive call
app_queue.c: Trying 'PJSIP/109' with metric 2
app_queue.c: Add PJSIP/109 to pending_members{quote}
tries=1
{quote}app_queue.c: PJSIP/108-00000005 is trying to call a queue member.
app_queue.c: Trying 'PJSIP/201' with metric 3
app_queue.c: Add PJSIP/201 to pending_members{quote}
tries=2
{quote}PJSIP/108-00000005 is trying to call a queue member.
app_queue.c: Trying 'PJSIP/107' with metric 0
app_queue.c: PJSIP/107 not available, can't receive call
app_queue.c: Trying 'PJSIP/108' with metric 1
app_queue.c: PJSIP/108 paused, can't receive call
app_queue.c: Trying 'PJSIP/109' with metric 2
app_queue.c: Add PJSIP/109 to pending_members{quote}
tries=3
{quote}app_queue.c: PJSIP/108-00000005 is trying to call a queue member.
app_queue.c: Trying 'PJSIP/201' with metric 3
app_queue.c: Add PJSIP/201 to pending_members{quote}
tries=4
{quote}Exiting on time-out cycle{quote}
I suppose this is intended behavior to check the status of the members before each attempt, since they are certainly capable of changing. I think the solution here, without breaking any use cases when noption=0, would be to do this when noption=1:
linear - Don't skip any ordered members. If they are unavailable or paused at the time they are supposed to be tried, they should be treated as failed attempts before trying the next ordered member.
rrordered - Same as the above, except we must start and end at a certain member.
rrmemory - Not sure, I think the order of these members changes?


> app_queue: Linear queue retries as many agents as were skipped
> --------------------------------------------------------------
>
>                 Key: ASTERISK-27017
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27017
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_queue
>    Affects Versions: 13.15.0, 13.16.0, 14.5.0
>            Reporter: Jared Hull
>         Attachments: log.txt, queues.conf.txt
>
>
> When using a linear or rrmemory queue, all agents are dialed in the order they are added to queues.conf. With the option 'n' added to the queue application, I would expect the queue to stop once it has reached the timeout of the last agent. It does this when all agents are (Not in use).
> n - No retries on the timeout; will exit this application and go to the next step
> Paused or unavailable agents (due to an unavailable contact status) will be skipped and cause the queue to loop around to the first agent and ring as many agents as there were paused or unavailable before 'Exiting on time-out cycle'.
> {quote}exten => 424242,1,Answer
> same => n,Queue(linearQ,wxRn)
> same => n(noAnswer),Busy{quote}
> {quote}testbed*CLI> queue show
> linearQ has 0 calls (max unlimited) in 'linear' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 60s
>    Members:
>       PJSIP/109 (ringinuse enabled) (paused) (Not in use) has taken no calls yet
>       PJSIP/100 (ringinuse enabled) (Unavailable) has taken no calls yet
>       PJSIP/103 (ringinuse enabled) (Not in use) has taken no calls yet
>       PJSIP/102 (ringinuse enabled) (Not in use) has taken no calls yet
>    No Callers{quote}
> The test case in log.txt, the order of agents and status is show above. the expected behaviour is that 103 and 102 would ring before the caller exits the queue to the next line in dialplan. Instead we see the queue loop around and dial both 103 and 102 again. If 109 was unpaused, it rings 109,103,102 and then loops around to 109 again because 100 is unavailable.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list