How to change the call queue when there is no agent online


I am new user of asterisk.

I created 3 different queues so the costumer can type (2) for support, (3) sales or (4) billing.
When the customer chose for example (3) and there is no agents online on the sales the call is drooped.

I would like to auto redirect the costumer if there is no agent online on the queue (3) or (4) from the drop to the queue (2) support. There is any easy way to set up this?

Thank you

Wouldn’t adding a queue (2) to the next priority after calling queue (3) or (4) solve this?

For example (syntax is not 100% correct):

exten => s,1,Answer()
exten => s,n,Queue(3)
exten => s,n,Queue(2)

You also need to set queue options to prevent the call joining the queue anyway. These have changed since I looked at them in detail.

if you have a low number of members, you could use “QUEUE_MEMBER_LIST” to get a list of the members of the queue, and if there’s none, forward them to a different queue with permanent members. I’ve never tried that though as my dialplan assumes there’s always someone there, otherwise directors get angry :smile:

This is assuming your members log in to the queue though, static members would always be a part of it, but may be DND.

then again you could try having a dnd or logoff speed dial context that checks to see if the ext that “logged off” was the last one, then change the destination of inbound calls accordingly…

you could also use “DEVICE_STATE” in local dials of the queue to check statuses, and re-route queue members to others.

that’s all just food for thought, pretty sure one of those ideas would at least help you a little.

Use Queue’s exit context for this.
You can route the calls to the support queue, in the exit context of the other two queues. Thus if the call is unanswered in any of the queues it will be routed to support queue instead.