[Home]

Summary:ASTERISK-30410: Queues doesn't load members according to the configuration files
Reporter:Jose Miguel Rivera (jmiguel26@2016)Labels:
Date Opened:2023-01-28 12:46:44.000-0600Date Closed:2023-01-29 15:35:34.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:18.16.0 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-17049 [patch] Setting linear queue strategy requires asterisk restart
Environment:OS: Debian 11 Host: VirtualBox Architecture: x86_64 CPU(s): 2 Thread(s) per core: 1 CPU Model: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHzAttachments:
Description:Adding a queue with static members in a particular order using the linear strategy is ignored by Asterisk.

Consider the configuration file below.

{code:title=queues.conf|borderStyle=solid}
[Q520]
setqueueentryvar=yes
setqueuevar=yes
timeoutpriority=app
strategy=linear
musicclass=default
autofill=yes
maxlen=0
announce=
wrapuptime=0
announce-round-seconds=0
announce-to-first-user=no
announce-position=no
relative-periodic-announce=no
announce-holdtime=no
autopause=no
ringinuse=no
timeoutrestart=no
joinempty=yes
timeout=15
leavewhenempty=no
retry=5
member=>Local/302@queue-call-to-agents/n,0,302,hint:302@extension-hints,no
member=>Local/100@queue-call-to-agents/n,0,100,hint:100@extension-hints,no
queue-thankyou=
{code}

The Asterisk CLI shows the following result:
{code:title=asterisk.cli|borderStyle=solid}
ast-srv*CLI> queue show Q520
Q520 has 0 calls (max unlimited) in 'linear' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
  Members:
     100 (Local/100@queue-call-to-agents/n from hint:100@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 92 secs ago)
     302 (Local/302@queue-call-to-agents/n from hint:302@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 92 secs ago)
  No Callers
{code}

As you can see, the order doesn't match the configuration file. But the main problem is that instead of dialing the first member defined in the configuration files, it dials the first member that appears in the Asterisk CLI.

{code:title=asterisk.cli|borderStyle=solid}
Executing [520@cos-all-post:16] Queue("PJSIP/101-00000000", "Q520,,,,,,,,,") in new stack
   -- Started music on hold, class 'default', on channel 'PJSIP/101-00000000'
   -- Called Local/100@queue-call-to-agents/n
{code}
Comments:By: Asterisk Team (asteriskteam) 2023-01-28 12:46:47.871-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2023-01-28 16:19:25.024-0600

Was the strategy changed and then Asterisk reloaded? Or was this fresh after an Asterisk start? (Using the given configuration for me the order is as given)

By: Jose Miguel Rivera (jmiguel26@2016) 2023-01-29 12:08:23.245-0600

*Steps to reproduce the issue:*
* Start Asterisk
* Create a queue with any other strategy but linear
** Apply changes using the command "core reload"
* Change the strategy to linear
** Apply changes using the command "core reload"

*Result:* the members are not added in the same order as in the configuration file.

{code:title=asterisk.cli|borderStyle=solid}
ast-srv*CLI> queue show Q520
Q520 has 0 calls (max unlimited) in 'linear' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
  Members:
     100 (Local/100@queue-call-to-agents/n from hint:100@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 92 secs ago)
     302 (Local/302@queue-call-to-agents/n from hint:302@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 92 secs ago)
  No Callers
{code}

Now, using the same configurations but restarting Asterisk instead of doing a core reload, it will show the members in the order defined in the configuration file.

{code:title=asterisk.cli|borderStyle=solid}
ast-srv*CLI> queue show Q520
Q520 has 0 calls (max unlimited) in 'linear' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
  Members:
     302 (Local/302@queue-call-to-agents/n from hint:302@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 1857 secs ago)
     100 (Local/100@queue-call-to-agents/n from hint:100@extension-hints) (ringinuse disabled) (Not in use) has taken no calls yet (login was 1857 secs ago)
  No Callers
{code}

On the other hand, if you create the queue with the "Linear" strategy from the beginning, the members will be listed in the correct order without restarting Asterisk.

In short, the problem occurs when you create a queue with a strategy other than "Linear" and then change it to "Linear".