Configuring Asterisk to respond to Options Messages

How can I configure Asterisk to respond to incoming SIP Options messages? For example if the asterisk were to receive options messages to determine if the primary server is up or if it should go to the secondary server.

What kind of questions are you talking about ? I would try running Nagios and maybe have a custom script that can set a variable in the machine sending the call to where it should send the call (if that makes any sense).