Yun can switch to reserve internet channel and track status of main peer.
You should have two nic cards with external ip adresses on it from different internet providers.
Not tested. It should work with ubuntu 14.04 and asterisk 11.
Usually run by cron at every minute.