If you want calls to be routed to a certain module (e.g. Voicemail or Phone call-back) based on the availability of agents, you need to use a Trigger that checks their availability.
The following Trigger checks if at least 1 agent is available (i.e. is not in a call and is enabled):
Once you built that Trigger, you can use it in your call flow modules. The following screenshot shows a Switch Node with two Routing Rules which routes the call to different welcome messages depending on the agent availability. If the Trigger "Agents available" fires, the message "Welcome-agents enabled" is played. This mechanism is defined in the first routing rule (the one with higher priority). If the first routing rule does not apply, the Trigger in the second rule is checked. Here, the same Trigger as in the first rule ist used. However, it is inverted. Hence, if the Trigger "Agents available" is not given (mind the small sign next to the Trigger), the audio "welcome only - no agents enabled" is played.
In the Automatic Call Distribution the same Trigger is used as a queue entry condition to decide when a call can enter the queue and is connected to an agent:
Hence, if no agents are available, the call will go straight to the "After flow" for that queue (e.g. your voicemail app or another application).