<div dir="ltr"><div>For Kamailio high availability you can refer to the following project:<br><br><a href="https://github.com/ghrst/Kamailio-HA">https://github.com/ghrst/Kamailio-HA</a><br><br></div>Regards<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 12:02 PM, <span dir="ltr"><<a href="mailto:mark@brightvoip.co.uk" target="_blank">mark@brightvoip.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi Moacir,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I use keepalived and MySQL in a similar way to what
you have described.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Keepalived to manage an active/passive Kamailio
pair and MySQL to store relevant data. I have both Master-Master and
Galera in use for MySQL. Mater-Master (again using Keepalived for an
active/passive pair) is rock-solid. Galera is good, although occasionally
the cluster will stop and need to be manually recovered - maybe I need to update
to later software.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I use Kamailio primarily for call routing, so do
not store state - so cannot advise on ability to find a called number. If
you are storing all info to the DB I would hope the 2nd server would have access
to the system state at the time the first server became inactive. You
would just lose whatever calls ended during the period between 1st server
failing and 2nd starting (max 20-30 seconds in my experience).</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Kind regards,</font></div>
<div><font face="Arial" size="2">Mark</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div>----- Original Message ----- </div>
<blockquote style="BORDER-LEFT:#000000 2px solid;PADDING-LEFT:5px;PADDING-RIGHT:0px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px">
<div style="FONT:10pt arial;BACKGROUND:#e4e4e4"><b>From:</b>
<a title="moacirferreira@hotmail.com" href="mailto:moacirferreira@hotmail.com" target="_blank">Moacir Ferreira</a> </div>
<div style="FONT:10pt arial"><b>To:</b> <a title="sr-users@lists.sip-router.org" href="mailto:sr-users@lists.sip-router.org" target="_blank">Kamailio Mail List</a> </div>
<div style="FONT:10pt arial"><b>Sent:</b> Sunday, June 05, 2016 10:26
PM</div><div><div class="h5">
<div style="FONT:10pt arial"><b>Subject:</b> Re: [SR-Users] High
availability</div>
<div><br></div>
<div dir="ltr">Hi,<br><br>Sorry... I should have mentioned before. You guys are
thinking on the standard Internet SIP calls' behavior while I am trying to use
Kamailio on a large "industrial" project. This said:<br><br>Assuming that the
end-point is "smart", the DNS method is functional but it would take quite a
while before the UA (phone) recovers from the previous name/IP binding it has
in cache;<br>SRV is good for a "smart" UA that, unfortunately, is not the
case;<br>Same for the phone units as they are industrial "Help Points" and so
quite "dummy".<br><br>While I never tested it, I thought I could use two
Kamailio servers with a mysql cluster like mariadb-galera where, for Kamailio
functions, one server would be "active" and another "passive" server. Then use
keepalived for monitoring the "active" Kamailio and starting the "passive"
server if the active Kamailio fails. Without any testing, tests that I think I
should have done before putting questions in here, my questions
are:<br><br>Suppose that I have two Kamailio servers, one "active" and
another one "passive" (not running) where the mysql databases are synchronized
in between two servers using MySQL Galera. Using keepalived I would monitor
the active Kamailio instance. Should it fails, start the "passive" Kamailio
instance using the same MySQL database that were supposed to be synchronized.
Would this new Kamailio instance be able to find a called number? Why this
question? As long as I understand, Kamailio will always challenge the UA for
authentication before making a call, so if this second server gets a call
request it would just challenge and authenticate the caller. The "key point"
would be having this new Kamailio instance aware about the called
destinations. So, delivering a MySQL database, with the latest data the active
Kamailio had, to this new Kamailio instance would be enough to allow it find
the called party?<br><br>Anyway, can you guys comment on my "thoughts"? Is it
possible? Am I missing something? Would you suggest another approach for such
scenario?<br><br>Cheers!<br>Moacir <br><br>
<div>
<hr>
Date: Sun, 5 Jun 2016 21:07:41 +0200<br>From: <a href="mailto:chabert.loic.74@gmail.com" target="_blank">chabert.loic.74@gmail.com</a><br>To:
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>Subject: Re: [SR-Users] High
availability<br><br>
<p dir="ltr">Hello Bill,</p>
<p dir="ltr">I have made kamailio ha using exabgp with loopbacks.</p>
<p dir="ltr">Check <a href="https://github.com/Exa-Networks/exabgp" target="_blank">https://github.com/Exa-Networks/exabgp</a></p>
<p dir="ltr">With bgp, kamailio cluster can be splited on severals
datacenters.</p>
<p dir="ltr">Regards.</p>
<div>Le 5 juin 2016 20:53, "Bill" <<a href="mailto:bill@novatrope.us" target="_blank">bill@novatrope.us</a>> a écrit :<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;PADDING-LEFT:1ex">
<div>Hi Moacir<br><br>We have only found three ways to handle
failover.<br>1. Change the DNS entry whenever a failure is detected.<br>2.
Use SRV records to display an alternate route.<br>3. Use the failover
mechanism in the phone itself<br><br>1. works, but it may take some time for
your ua's to become aware of the change<br>2. never have been able to get
this to work as advertised.<br>3. Works pretty well depending on the phone.
(We use mostly Yealink's and they seem to handle the failover pretty
well.)<br><br>Hope this helps<br><br>
<div>On 06/05/2016 07:41 AM, Moacir Ferreira wrote:<br></div>
<blockquote>
<div dir="ltr">Hi,<br><br>I got two questions regarding high
availability:<br><br>1 - Should my Kamailio server fail, I would like
another Kamailio "box/server" to take over with minimum services
disruption. What is the "community" advice for such environment?<br><br>2
- Should my main PSTN gateway fail, what would be the best mechanism to
redirect calls to a second PSTN
gateway?<br><br>Cheers!<br>Moacir<br></div><br>
<fieldset></fieldset> <br><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre></blockquote><br></div><br>_______________________________________________<br>SIP
Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br><br></blockquote></div><br>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></div></div>
</div></div><p>
</p><hr><span class="">
<p></p>_______________________________________________<br>SIP Express Router
(SER) and Kamailio (OpenSER) - sr-users mailing
list<br><a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br></span><p></p></blockquote><br>
<table style="border-top:1px solid #d3d4de">
<tbody><tr>
<td style="width:55px;padding-top:13px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange_184x116-v1.png" height="29px"></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" style="color:#4453ea" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody></table></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>