Queue agents always unavailable

We have FreePBX 17 queue agents that always show as unavailable with the “queue show” command no matter what queue they are added to. I’ve deleted the extensions and recreated them but they still show unavailable when using the same extension number. There must be something in one of the databases somewhere showing them as unavailable. Where is that data stored and how to change and/or remove it? Thanks

These queue agents are Virtual extensions. Some of those Virtual extensions agents always show as available in the queue when joined to the queue, and some always show as unavailable when joined. Since they are virtual, what makes they system detect if the agents are available or unavailable? Is there a cli command to and/or feature code, etc. to change their availability status? Again, in which database and field(s) is that availability data stored? Thanks

Anyone have any ideas?

Hi @pcdub
Queue member added to Static agent or Dynamic agent..?
Can you give a try by adding to Static agent list, it would show available

It shows both static and dynamic agents as unavailable.
Any answers about where that availability data is stored (which database and field(s)), and how to change the agent availability data via a CLI command, etc.? Thanks

For now we changed the queue agent extensions from virtual to PJSIP, and then registered desk phones to them so they would show as available in the queue. Also using softphones for agents instead of extensions that are forwarding. It would still be helpful to know where that agent availability data is stored, and options for changing it.

Agent availability is not stored in a file or database — it’s tracked dynamically in Asterisk memory based on the following factors:

  • Device state
  • Channel state
  • Registration status
  • Presence and DND status
  • Pause/unpause state

If you want to view or manage an agent’s pause status, you can use the following commands in the Asterisk CLI:
My queue number is - 8787
Queue member is 2001

freepbx*CLI> queue show 8787
8787 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 60s
  Members:
     2001 (Local/2001@from-queue/n from hint:2001@ext-local) (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet (login was 8 secs ago)
  No Callers

To pause the agent:

freepbx*CLI> queue pause member Local/2001@from-queue/n queue 8787

Check again to confirm paused state:

freepbx*CLI> queue show 8787

Thank you! That is very helpful info to know how it is tracked.

A little clarification on this. The channel state is used to update the device state. Since these are virtual extensions there is no real device to update the device state. In order for the queue to know the state of a virtual extension, there needs to be logic that updates the CustomDev state being used by the virtual extension.

So if the virtual extension is 200, you end up with a hint that looks like this:
exten => 200,hint,&Custom:DND200,CustomPresence:200 there’s no device to track (i.e PJSIP/200) so the channel state updates nothing.

In order for the queues to track virtual extensions properly, there would need to be logic added to update the custom device of DND200 to IN_USE or RINGING. We’ve talked about this in previous threads here…updating the DND custom device state to something outside of BUSY or Available will break the DND checks.

So the logic for handle states for queues would need to be update to account for extensions that lack any attachment to an actual device like virtual extensions. It would also need to be updated so that it doesn’t break existing DND check logic.

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