Branch Survivability 2.0

I am trying to implement Branch Survivability in the event all access to the cloud server is lost. The intent is to provide phone services within the branch using a redundant onsite server. I have no issues with the SIP phones but have a number of analog lines coming through channel banks that need to be pointed to the onsite server in the event of a network (WAN) failure.