Joinempty=inuse not working Asterisk 16.4.0

I have a test queue configured as follows:

[general]
persistentmembers = yes
monitor-type = MixMonitor
autofill = yes
autopause = no
maxlen = 0

[test]
strategy=ringall
wrapuptime=5
timeout=6
music=none
joinempty=paused,inuse,ringing,invalid
ringinuse=no
weight=0
member => PJSIP/1102@domain.net

When a call comes in to the queue the endpoint shows in use:

switch01*CLI> queue show test
test has 0 calls (max unlimited) in 'ringall' strategy (3s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   Members: 
      PJSIP/1102@domain.net (ringinuse disabled) (in call) (Busy) has taken no calls yet
   No Callers

But the next call joins the queue:

switch01*CLI> queue show test
test has 1 calls (max unlimited) in 'ringall' strategy (3s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   Members: 
      PJSIP/1102@domain.net (ringinuse disabled) (in call) (Busy) has taken no calls yet
   Callers: 
      1. PJSIP/1103@domain.net-00000039 (wait: 0:02, prio: 0)

Any ideas what I’m doing wrong?

Can you double-check your Queue() entry point from your dialplan and please post that along with logs ?

And try limiting your test queue settings for minimal conflict between options:

strategy=ringall
joinempty=inuse
member => PJSIP/1102@domain.net

Hi, thanks for helping out.

This is now my queue configuration:

[general]
persistentmembers = yes
monitor-type = MixMonitor
autofill = yes
autopause = no
maxlen = 0

[test]
strategy=ringall
joinempty=inuse
member => PJSIP/1102@domain.net

This is my dialplan entry into the queue:

exten = *88,1,NoOp(Queue testing)
 same = n,Queue(test,r,,,60)
 same = n,Hangup()

The behaviour is the same, this is the output of the console periodically checking the queue:

switch01*CLI> queue reload all
[Jul 17 08:40:58] NOTICE[11656]: app_queue.c:9141 reload_queue_rules: No queuerules.conf file found, queues will not follow penalty rules
switch01*CLI> queue show
test has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   Members: 
      PJSIP/1102@domain.net (ringinuse enabled) (Not in use) has taken no calls yet
   No Callers

  == Setting global variable 'SIPDOMAIN' to 'domain.net'
    -- Executing [*88@domain.net:1] Goto("PJSIP/1103@domain.net-00000042", "__normal__,,1")
    -- Goto (__normal__,*88,1)
    -- Executing [*88@__normal__:1] NoOp("PJSIP/1103@domain.net-00000042", "Queue testing") in new stack
    -- Executing [*88@__normal__:2] Queue("PJSIP/1103@domain.net-00000042", "test,r,,,60") in new stack
    -- Called PJSIP/1102@domain.net
    -- PJSIP/1102@domain.net-00000043 connected line has changed. Saving it until answer for PJSIP/1103@domain.net-00000042
    -- PJSIP/1102@domain.net-00000043 is ringing
    -- PJSIP/1102@domain.net-00000043 is ringing
    -- PJSIP/1102@domain.net-00000043 answered PJSIP/1103@domain.net-00000042
    -- Channel PJSIP/1102@domain.net-00000043 joined 'simple_bridge' basic-bridge <cef272b7-ffeb-4f9a-8f11-73b73b9ede50>
    -- Channel PJSIP/1103@domain.net-00000042 joined 'simple_bridge' basic-bridge <cef272b7-ffeb-4f9a-8f11-73b73b9ede50>
switch01*CLI> queue show
test has 0 calls (max unlimited) in 'ringall' strategy (7s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   Members: 
      PJSIP/1102@domain.net (ringinuse enabled) (in call) (Busy) has taken no calls yet
   No Callers

  == Setting global variable 'SIPDOMAIN' to 'domain.net'
    -- Executing [*88@domain.net:1] Goto("PJSIP/1101@domain.net-00000044", "__normal__,,1")
    -- Goto (__normal__,*88,1)
    -- Executing [*88@__normal__:1] NoOp("PJSIP/1101@domain.net-00000044", "Queue testing") in new stack
    -- Executing [*88@__normal__:2] Queue("PJSIP/1101@domain.net-00000044", "test,r,,,60") in new stack
    -- Called PJSIP/1102@domain.net
    -- PJSIP/1102@domain.net-00000045 connected line has changed. Saving it until answer for PJSIP/1101@domain.net-00000044
    -- PJSIP/1102@domain.net-00000045 is ringing
    -- PJSIP/1102@domain.net-00000045 is ringing
switch01*CLI> queue show
test has 1 calls (max unlimited) in 'ringall' strategy (7s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s
   Members: 
      PJSIP/1102@domain.net (ringinuse enabled) (in call) (Busy) has taken no calls yet
   Callers: 
      1. PJSIP/1101@domain.net-00000044 (wait: 0:04, prio: 0) 

  == Spawn extension (__normal__, *88, 2) exited non-zero on 'PJSIP/1101@domain.net-00000044'
    -- Channel PJSIP/1103@domain.net-00000042 left 'simple_bridge' basic-bridge <cef272b7-ffeb-4f9a-8f11-73b73b9ede50>
    -- Channel PJSIP/1102@domain.net-00000043 left 'simple_bridge' basic-bridge <cef272b7-ffeb-4f9a-8f11-73b73b9ede50>
  == Spawn extension (__normal__, *88, 2) exited non-zero on 'PJSIP/1103@domain.net-00000042'

That could be a bug in Asterisk. But you might look at the QUEUE_MEMBER function instead in order to work around it, specifically the “ready” option, and adjust your dial plan to skip the entry to the Queue() application altogether if there are an insufficient number of members available to immediately answer the call.