This is what I did.  A lot more stuff is involved but I will let you figure it out.  I have it so that I manually have to go and enable a disabled asterisk server in Dispatcher because I want to make sure the failed one that comes back up is in sync with the spare.<br /><br />                ### - Set timeout to failover<br />                $avp(fr_inv_timer) = &quot;2&quot;;<br />                $avp(fr_timer) = &quot;2&quot;;                    <br /><br /><br />                switch($avp(vmserver))<br />                {<br />                        case &quot;1&quot;:<br />                                ds_select_dst(&quot;1&quot;,&quot;8&quot;);<br />                                #t_on_failure(&quot;10&quot;);<br />                                #t_relay();<br />                        break;<br />                        case &quot;2&quot;:<br />                                ds_select_dst(&quot;2&quot;,&quot;8&quot;);<br />                                #t_on_failure(&quot;10&quot;);<br />                                #t_relay();<br />                        break;<br />                        case &quot;3&quot;:<br />                                ds_select_dst(&quot;3&quot;,&quot;8&quot;);<br />                                #t_on_failure(&quot;10&quot;);<br />                                #t_relay();<br />                        break;<br />                        case &quot;4&quot;:<br />                                ds_select_dst(&quot;4&quot;,&quot;8&quot;);<br />                                #t_on_failure(&quot;10&quot;);<br />                                #t_relay();<br />                        break;<br />                        default:<br />                                log(&quot;No Asterisk Server configured&quot;);<br />                                sl_send_reply(&quot;503&quot;,&quot;Service Unavailable&quot;);<br />                }<br /><br />                t_on_failure(&quot;10&quot;);<br />                t_relay();<br /><br />                avp_delete(&quot;$avp(vmserver)&quot;);<br />                exit;<br /><br /><br />failure_route[10]{<br />        ### - Handle Asterisk Media Server Dispatcher Failures<br /><br />        if(t_was_cancelled() ) {<br />                exit;<br />        }<br /><br /><br />        if( t_check_status(&quot;[56][0-9][0-9]&quot;) || t_check_status(&quot;408&quot;) ) {<br /><br />                ### - We need to set the last Gateway as Inactive<br />                ds_mark_dst();<br /><br /><br />                if(ds_next_dst()) {<br /><br />                        t_on_failure(&quot;10&quot;) ;<br /><br />                        t_relay() ;<br />                        exit;<br />                }<br />                t_reply(&quot;503&quot;,&quot;Service not available, no more gateways&quot;);<br />                exit ;<br />        }<br />        exit ;<br />}<br /><br /><br /><br /><br /><br /><br /><br />On , gwallis &lt;gary.wallis@voicecarrier.com&gt; wrote:<br />&gt; Where/how is the failover route configured?<br />&gt; <br />&gt; <br />&gt; <br />&gt; Any more details or manual/book or other doc links hints appreciated.<br />&gt; <br />&gt; <br />&gt; <br />&gt; (Sorry in advance for the newbie -or RTFM avoidance- questions)<br />&gt; <br />&gt; <br />&gt; <br />&gt; --<br />&gt; <br />&gt; View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/best-way-to-use-one-active-one-hot-spare-asterisk-server-behind-OpenSIPS-tp6979044p6979499.html<br />&gt; <br />&gt; Sent from the OpenSIPS - Users mailing list archive at Nabble.com.<br />&gt; <br />&gt; <br />&gt; <br />&gt; _______________________________________________<br />&gt; <br />&gt; Users mailing list<br />&gt; <br />&gt; Users@lists.opensips.org<br />&gt; <br />&gt; http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br />&gt; <br />&gt;