Hi Henning,<br><br>I&#39;m using something like you described. I&#39;ll rely on the probabilities to make the trick and that&#39;s all.<br><br>Thanks for the quick reply!<br>Uriel<br><br><div class="gmail_quote">On Tue, Apr 14, 2009 at 8:11 AM, Henning Westerholt <span dir="ltr">&lt;<a href="mailto:henning.westerholt@1und1.de">henning.westerholt@1und1.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Monday 13 April 2009, Uriel Rozenbaum wrote:<br>
&gt; I&#39;m configuring some balance and failure routes with CarrierRoute module.<br>
&gt;<br>
&gt; I have the following topology:<br>
&gt;<br>
&gt;                                     -----------&gt; Carrier1<br>
&gt;                --------&gt; GW1<br>
&gt;                                     -----------&gt; Carrier2<br>
&gt; Kamailio<br>
&gt;                                     -----------&gt; Carrier1<br>
&gt;                --------&gt; GW2<br>
&gt;                                     -----------&gt; Carrier2<br>
&gt;<br>
&gt; The idea will be to select a carrier using carrierroute going out through<br>
&gt; GW1. If GW1 fails (timeout) i want the call to go to the same carrier<br>
&gt; through the other GW.<br>
<br>
</div>Hi Uriel,<br>
<div class="im"><br>
&gt; I assume the hash value calculated on cr_route will<br>
&gt; be the same for the failure route, but I need to verify the fields used on<br>
&gt; the DB to calculate a hash_index and the way that they are calculated so I<br>
&gt; can assure the previous behavior.<br>
<br>
</div>The hash index is only configurable in the config file mode. This is for<br>
example usable if you use it in front of a registrar cluster that access a<br>
partioned database. I.e. the user location information for user that hash to<br>
index 1 is stored in DB A, hash index 2 is stored in DB B and so on.. Then<br>
you can ensure that all users that hash to 1 goes to the appropriate<br>
registrar server.<br>
<br>
But for your use case you probably don&#39;t need to configure this. If you want<br>
to configure a failover logic like this then you only need to setup the<br>
routing rules appropriate. Example for carrierroute:<br>
<br>
- carrier1, prop 50%, domain0 -&gt; GW1 (Carrier 1)<br>
- carrier1, prop 50%, domain0 -&gt; GW2 (Carrier 1)<br>
- carrier2, prop 50%, domain0 -&gt; GW1 (Carrier 2)<br>
- carrier2, prop 50%, domain0 -&gt; GW2 (Carrier 2)<br>
<br>
- carrier1, prop 100%, domain1 -&gt; GW2 (Carrier 1)<br>
- carrier2, prop 100%, domain1 -&gt; GW2 (Carrier 2)<br>
- carrier1, prop 100%, domain2 -&gt; GW1 (Carrier 1)<br>
- carrier2, prop 100%, domain2 -&gt; GW1 (Carrier 2)<br>
<br>
carrier_failure_route:<br>
<br>
- reply match 408, hostname GW1, carrier1 -&gt; next_domain 1<br>
- reply match 408, hostname GW1, carrier2 -&gt; next_domain 1<br>
- reply match 408, hostname GW2, carrier1 -&gt; next_domain 2<br>
- reply match 408, hostname GW2, carrier2 -&gt; next_domain 2<br>
<br>
Hope that helps.. If you don&#39;t like to specify the failover logic manually<br>
like this, you could use the dispatcher module instead, which supports<br>
detection of dead GWs and provides methods of trying the &quot;next&quot; GW in failure<br>
route.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Henning<br>
</font></blockquote></div><br>