Call Forward on DEVICE_STATE

Hello All,

I have an Asterisk server hosted in a datacentre. If our office Internet goes down calls go directly to voicemail. Is it possible to have Freepbx use CF or Follow Me, only if the devices are Unreachable.

I’ve been reading on DEVICE_STATE and making various attempts at implementing it’s use in extensions_additional.conf. Does anyone know if this is possible and would you paste a sample dialplan to assist?