<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 15 Feb 2016, at 22:32, Derek Bolichowski <<a href="mailto:derek@empire-team.com" class="">derek@empire-team.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi there,<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">New user to Kamailio here. We currently have it up and running in a virtualized environment with 1 Kamailio sever, 1 Asterisk server and 1 MySQL server.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’m currently writing install scripts to make deploying new nodes/servers easy and to keep settings the same across the board.  I’ve chosed to load the db_cluster.so module in kamailio.cfg, as we will have 2x MySQL servers in master-master replication which will contain the ‘kamailio’ and ‘asterisk’ tables.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’ve just hit a stumbling block – in `kamctlrc`, there is a field called `DBHOST=`.  How can I reference my cluster here?<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">In kamailio.cfg, I simply define DBURL as “cluster//<clustername>”.  What is the syntax for ‘DBHOST=’ in ‘kamctlrc’?  Can I reference the cluster? Can I have 2 separate DBHOST= lines?<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Looking for some guidance on this one.<o:p class=""></o:p></div></div></div></blockquote><br class=""></div><div>kamctlrc controls Kamctl that is an outside script that one can decide to use to manage Kamailio. It has it’s own set of database connection methods and can’t use the cluster module in Kamailio.</div><div><br class=""></div><div>There are two cases where kamctl and kamdbctl (the sister script) use database - to create the actual database and to search/update. With a master/master you decide if you create the tables on one side and let mysql replicate or if you create it on both sides before you initialize replication.</div><div><br class=""></div><div>For other queries you can choose to simply refer to one of the servers in kamctlrc - it’s usually</div><div>not mission critical. If that server is down, your query will fail but the Kamailio service will run thanks to cluster logic in the db_cluster module.</div><div><br class=""></div><div>If you want a similar functionality for kamctl you may want to install the mysql proxy that can do failover in a way similar to db_cluster. </div><div><br class=""></div><div>Cheers,</div><div>/O</div><br class=""></body></html>