<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 02/02/2011 12:20 PM, Danny Dias wrote:
<blockquote
 cite="mid:AANLkTikAFLO7rebLF5W6spJtXMagj=zeGuR8vVj2nxq4@mail.gmail.com"
 type="cite"><font size="2"><font face="tahoma,sans-serif">Hello,&nbsp;</font></font>
  <div><font size="2"><font face="tahoma,sans-serif"><br>
  </font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">I was thinking
that if i store the contacts that are registered into my proxy in a
database, like this:</font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif"><br>
  </font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">.</font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">.</font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif"><br>
  </font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">
  <div># ----- usrloc params -----</div>
  <div>modparam("usrloc", "db_mode", &nbsp; 3)</div>
  <div>.</div>
  </font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">.</font></font></div>
  <div><font size="2"><font face="tahoma,sans-serif">
  <div>if (is_method("REGISTER"))</div>
  <div>{</div>
  <div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if (!save("location"))</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;sl_reply_error();</div>
  <div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;exit;</div>
  <div>&nbsp;&nbsp;}</div>
  <div>.</div>
  </div>
  <div>.</div>
  <div><br>
  </div>
  <div>This way i would store the contacts in table "location", and
then i could make a backup of the DB and restore on the other
server...is that ok? or i'm missing something?</div>
  </font></font></div>
</blockquote>
<br>
Or you can use the p_usrloc module that does automatically the db
replication and failover + data partitioning (or you can combine them
to suite your needs). New in master branch (&lt;/shameless
advertisement&gt;)<br>
<br>
But seriously, we might want to give it a try. The config syntax
remains the same as above you just need to load p_usrloc instead of
usrloc and setup the databases.<br>
<br>
Marius<br>
<blockquote
 cite="mid:AANLkTikAFLO7rebLF5W6spJtXMagj=zeGuR8vVj2nxq4@mail.gmail.com"
 type="cite">
  <div><font size="2"><font face="tahoma,sans-serif">
  <div><br>
  </div>
  <div>Thanks in advance for your help!&nbsp;</div>
  <div><br>
  </div>
  </font></font></div>
  <div><font class="Apple-style-span" face="tahoma, sans-serif"><br>
  </font></div>
  <div><br>
  <div class="gmail_quote">2011/1/27 I&ntilde;aki Baz Castillo <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;</span><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">2011/1/27 Danny Dias &lt;<a moz-do-not-send="true"
 href="mailto:ing.diasdanny@gmail.com">ing.diasdanny@gmail.com</a>&gt;:<br>
    </div>
    <div class="im">&gt;&gt; Two Kamailios in a HeartBeat cluster which
manages the kamailio<br>
&gt;&gt; service along with a virtual IP in which kamailios are
supposed to<br>
&gt;&gt; listen. Just one kamailio is running (HA manages them).<br>
&gt;&gt;<br>
&gt;<br>
&gt; So, the heartbeat cluster shall manage that both are ok and also
check that<br>
&gt; the virtual ip and the kamailio service in the primary server is
OK....if<br>
&gt; something fails it will activate the virtual IP address and the
kamailio<br>
&gt; process in the other server? so this heartbeat cluster is
installed in both<br>
&gt; kamailio servers?<br>
&gt; which HA software do you recommend?<br>
    <br>
    </div>
As I said at the top of my previous mail: HeartBeat (as it is the only<br>
I'm used to).<br>
    <div class="im"><br>
    <br>
&gt;&gt; Regsitration can be done in a shared database with db_mode=3
(or 2) so<br>
&gt;&gt; no locations are lost when HA stops the running instance of
kamailio<br>
&gt;&gt; (or the server is down) and starts kamailio in the other
cluster node.<br>
&gt;&gt;<br>
&gt;<br>
&gt; So, the database of the kamailios should be dedicated and
externalised<br>
&gt; server?<br>
    <br>
    </div>
Could be, or not. It doesn't matter too much.<br>
    <font color="#888888"><br>
    <br>
--<br>
    </font>
    <div>
    <div class="h5">I&ntilde;aki Baz Castillo<br>
&lt;<a moz-do-not-send="true" href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;<br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  </div>
</blockquote>
<br>
</body>
</html>