You can have your Enterprise Front-End server in the main office so that all users connect to this Front-End Server
Place a Gateway and Mediation server in every office to connect to local PBX
You need Location Profiles for all offices and Routes to the appropriate Mediation Servers
If the WAN link goes down the you can have Gateways that have built in Survivability into the Gateway itself for OCS clients
This is the general idea but it's kind of hard to design your network with so few information