User in a queue reported as (in call) while not in use

Hi,

I’m having trouble with redirecting a call between two users in the same queue.

Here is the scenario:

  1. A call come to the queue 4501, and it goes to the user 9901
  2. The user 9901 redirect the call to 9933 using AMI Redirect (Channel parameter = remote channel)
  3. The user 9933 receives the call, and i see that 9901 is not in use, but i see (in call) for the user 9901
  4. If i make another call, it stays on hold, until i remove 9901 from the queue then connects it.

Here is the output of queue show

4501 has 1 calls (max unlimited) in 'fewestcalls' strategy (6s holdtime, 66s talktime), W:0, C:16, A:0, SL:56.2% within 0s
   Members: 
      Local/9901@from-queue/n (ringinuse disabled) (dynamic) (in call) (Not in use) has taken 4 calls (last was 3070 secs ago)
      Local/9933@from-queue/n with penalty 40 (ringinuse disabled) (dynamic) (paused) (In use) has taken 1 calls (last was 5604 secs ago)
   Callers: 
      1. SIP/mani_in-0000063c (wait: 0:24, prio: 0)

What does (in call) mean, and is there something that needs to be done after redirecting the call to make the user available again?

Thank you

Please provide the Asterisk version and the configuration. Just guessing it appears as though you aren’t adding a device to the agent entry in the queue. This means that the queue will use the device state of the Local channel to determine if it is in use or not. If you move the Local channel around it would still be in use.

Thank you for your reply

I’m using Asterisk 13.11.2.

I add agents to the queue using addqueue (AMI), but i specify the parameter StateInterface, which i think reprensents the device? for example for a member Local/9901@from-queue/n, StateInterface is SIP/9901.

I always find that there is still a channel belonging to the queue member after doing the redirect, but doing a
channel request hangup Local/9911@from-queue-0000897b;1
won’t hangup the channel

Ok, i think i found the solution.

So there was a channel that wasn’t hangup, event when the bridge was destroyed.

There is this variable that we can set using the CHANNEL function (after_bridge_goto), so that asterisk sends the channel to a context if the channel exits the bridge but is not hangup

same => n,Set(CHANNEL(after_bridge_goto)=afterbridge,s,1)

in the context, i just call Hangup()