You can connect your Twilio applications with your Twilio numbers by specifying the URLs (or an Application SID) that will be handling voice and SMS requests.
In addition, you can set Fallback URLs that Twilio will request if Twilio is unable to reach your primary application URLs.
It's good practice to have your backup application hosted in a separate environment than your primary application in the event your primary application is unreachable.
It's also a good idea to have your Fallback URL be a static IP address in the event of a large scale DNS failure.
This blog post provides more information about configuring your application's Fallback URLs as well as best practices for building highly reliable applications.