Realtime queue_members does not respect linear strategy

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.


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
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:

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
      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?

side note

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)

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.

Some one know how to solve it?

I have opened an Issue: [ASTERISK-29471] Realtime queue_members does not respect linear strategy - Digium/Asterisk JIRA