To set up SIP dial-peer to point to alternate SIP server if the primary fails, perform these steps:
Configure Session Initiation Protocol (SIP) retry invite to another value other than default six. For example,SIP retry invite three.
Adjust SIP trying timers under SIP-UA config. If you are using ISDN, you may want to tweak this due to the ISDN T310 timers. This way, you give it time to go to the next SIP dial-peer before the ISDN disconnects the call.
Create the same dial-peers, and use the preference command to adjust preferences.
In the dial-peer config, configure different preferences if you always want it to try the same server and fall to the next server if the primary is down. You can adjust the dial-peer hunt to change the dial-peer matching order.