Queue members can be defined as having a penalty – e.g.
member => SIP/200,1
member => SIP/201,2
member => SIP/202,3
member => SIP/203,2
If the strategy is defined as ‘ringall’, then only those available members with the lowest priorities will ring. In the example above, if 200 is not busy, then only 200 will ring. If 200 is busy, then only 201 and 203 will ring. If 200, 201 and 203 are busy, then 202 will ring.
Note: If extension 200 does not pick up it will not automatically go to extension 201. It will keep ringing 200 until they pick up. It will only go to the next extension if the current extension is either busy or unavailable.
You can set up a series of queues that cascade to each other. You can get a similar effect by using the penalty feature but this can be a better way to do things for some situations (e.g. if you want to overflow calls to your receptionist into your office for when your receptionist is busy).
The first thing you must do is have a timeout on our queue. This is done as a parameter of the Queue command used in extensions.conf (example: Queue(dave|t|||45)).
You can then set up a number of queues and simply have your dialplan call each queue in succession.
exten => 1589,1,Answer
exten => 1589,2,Ringing
exten => 1589,3,Wait(2)
exten => 1589,4,Queue(testq|t|||45)
exten => 1589,5,Queue(testq2|t|||45)
exten => 1589,6,Hangup
; The old/current behavior of the queue has a serial type behavior in that the queue will make all waiting callers wait in the queue even if there is more than one available member ready to take calls until the head caller is connected with the member they were trying to get to.
; The next waiting caller in line then becomes the head caller, and they are then connected with the next available member and all available members and waiting callers waits while this happens.
; The new behavior, enabled by setting autofill=yes makes sure that when the waiting callers are connecting with available members in a parallel fashion until there are no more available members or no more waiting callers.
; This is probably more along the lines of how a queue should work and in most cases, you will want to enable this behavior.
; If you do not specify or comment out this option, it will default to no to keep backward compatibility with the old behavior.
autofill = yes