# Realtime queue\_members does not respect linear strategy

**URL:** <https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494>\
**Category:** Asterisk Support\
**Created:** [May 5, 2021, 12:51pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494 "2021-05-05T12:51:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![celsoannes](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/celsoannes/32/2013_2.png) [@celsoannes](https://community.asterisk.org/u/celsoannes)\
**Post date:** [May 5, 2021, 12:51pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/1 "2021-05-05T12:51:34Z")

</div>

I am using realtime **queues** and **queue\_members** on postgres, I am using the **strategy linear** I can not make the queue respect the order I add the members on queue\_members, I beleve that the uniqueid shoud set the order that the members are call.

**`/etc/asterisk/extconfig.conf`**

```auto
[settings]
queue_log => odbc,anequim_cdr,queue_log
queues => odbc,anequim_config
queue_members => odbc,anequim_config

```

I am trying to ring on the following order:

1. SIP/9000
2. SIP/1000
3. SIP/3000
4. SIP/2000

```auto
anequim_config=# SELECT * FROM queue_members;
 queue_name | interface | uniqueid | membername | state_interface | penalty | paused
------------+-----------+----------+------------+-----------------+---------+--------
 teste | SIP/9000 | 1 | | | |
 teste | SIP/1000 | 2 | | | |
 teste | SIP/3000 | 3 | | | |
 teste | SIP/2000 | 4 | | | |
(4 registros)

```

Asterisk always load and ring queue based on the interface numeric order:

```auto
asterisk18*CLI> queue show teste
teste 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:
      SIP/1000 (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
      SIP/2000 (ringinuse enabled) (realtime) (Unavailable) has taken no calls yet
      SIP/3000 (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
      SIP/9000 (ringinuse enabled) (realtime) (Invalid) has taken no calls yet
   No Callers

```

I already tried on Asterisk 16 and now I have the same problem on Asterisk 18.  
I am using Debian 9 with PostgreSQL 9.6.20, ODBC.

What defines the order of members is called on the **queue\_member** when used **strategy linear**?  
What I am doing wrong?  
Can someone help me make it work properly?

---

<div class="post-metadata">

**Author:** ![benphone](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/benphone/32/8706_2.png) [@benphone](https://community.asterisk.org/u/benphone)\
**Post date:** [May 5, 2021, 1:35pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/2 "2021-05-05T13:35:26Z")

</div>

side note

> Blockquote  
> Linear – agents are rang in the order specified. _Due to some asterisk limitation, it is not possible to change the Strategy of an already defined Queue to “Linear_”. The queue needs to be destroyed and recreated (Asterisk strategy LINEAR)

---

<div class="post-metadata">

**Author:** ![celsoannes](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/celsoannes/32/2013_2.png) [@celsoannes](https://community.asterisk.org/u/celsoannes)\
**Post date:** [May 5, 2021, 2:22pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/3 "2021-05-05T14:22:16Z")

</div>

I think it refers when you create a queue with a strategy different from linear and change it to linear:

For instance, if you have a queue strategy **`rrmemory`** and change it to **`linear`** you have to restar asterisk to make it work as linear.

That is not the problem I am having, I create a queue as linear and it just doesnt respect an order, even if I restar the asterisk.

Just to remember, I am using **Realtime**.

---

<div class="post-metadata">

**Author:** ![celsoannes](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/celsoannes/32/2013_2.png) [@celsoannes](https://community.asterisk.org/u/celsoannes)\
**Post date:** [May 13, 2021, 11:06am UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/5 "2021-05-13T11:06:53Z")

</div>

Some one know how to solve it?

---

<div class="post-metadata">

**Author:** ![celsoannes](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/celsoannes/32/2013_2.png) [@celsoannes](https://community.asterisk.org/u/celsoannes)\
**Post date:** [June 9, 2021, 2:58pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/6 "2021-06-09T14:58:06Z")

</div>

I have opened an Issue: [[ASTERISK-29471] Realtime queue\_members does not respect linear strategy - Digium/Asterisk JIRA](https://issues.asterisk.org/jira/browse/ASTERISK-29471)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 9, 2021, 2:58pm UTC](https://community.asterisk.org/t/realtime-queue-members-does-not-respect-linear-strategy/88494/7 "2021-07-09T14:58:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
