Setting up sporadically-available agents?

Hi there,
I’m setting up a tiny inbound contact centre, where most of the agents have radically different hours of availability. For example, one agent is available 9-12 and 2-4:30 Monday, 10-2pm Tuesday and 9-4 Thursday. Other agents are available in different and equally weird time windows through the week.

I’ve set up a timecode groups and time condition for each agent, to forward to their extension when the time matches, or hang up if not.

My question is - what’s the best way to combine them into a single destination?

Should I set up extra extensions and have these forward through to the respective time conditions, then build a queue or ring group targeting these extensions?

Or should I set up custom applications for each time condition, then set up a ring group including the pseudo-extension number of each custom application?

Or is there a simpler and cleaner way?

Thanks for any help

Set up a queue with all your users as dynamic agents and have them login/logout (or pause) when they are available.

1 Like

Hi Lome,

I failed to mention that it’s a requirement for these agents to be automatically logged in and out, because a lot of the time they’ll be in various places with just their cellphones handy, and I don’t want them to have to remember to log in or out manually.


log them in and out with a command in a in cron

In the past I built an integration that would check a calendar for events and make PBX changes that corresponded to the calendar events (who is on call, etc.). That, or an integration with your current scheduler for workers, would be the only automated way to do what you are asking without massive management overhead.

What about something like FOP2 that would let you dynamically add agents to whatever queues from a browser window? Not automatic but controllable with visibility.


You could do it with crontab easily enough.

# add member to queue at 10am M-F
0 10 * * 1-5 /usr/sbin/asterisk -rx "queue add member PJSIP/5120 to 5151"

# remove member from queue at 12pm M-F
0 12 * * 1-5 /usr/sbin/asterisk -rx "queue remove member PJSIP/5120 from 5151"

… or if it’s really sporadic, you could write an entire app that sets and unsets the membership in the queue. Set it up to run once a minute and when someone’s supposed to “log in” the system can set them up, and vice versa.

by ‘app’, do you mean an external cron job running a script which connects to the database and executes queries to log the respective users into and out of the queue?

Sure - use any of the many variations on the vernacular term “app” you’d like. There are phone apps, Android apps, Asterisk apps, database apps, Windows apps, etc. Literally any of them could be used to perform this. All you have to do is hit the “API” (which is this case is a call to the ‘rasterisk’ program with options) to make this happen.