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.