I am using Asterisk 1.8.10.1 on Ubuntu Server 12.04. I use MySQL to store CDR records using cdr_adaptive_odbc.<br>The problem: When the MySQL Server fails for whatever reason, Asterisk never reconnects automatically! So I loose all CDR informations even after the MySQL server works again.<br>
isql (used as ODBC testtool) tells me, that ODBC reconnects or does a new connection on request, so ODBC seems not to be the problem, but Asterisk. <br>Is there any automatic reconnect option on Asterisk concercing ODBC / cdr_adaptive_odbc? My complete configuration including ODBC is as follows:<br>
<br><b>ODBC:<br><br>/etc/odbcinst.ini<br></b><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[MySQL]<br>Description = ODBC for MySQL<br>Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so<br>
Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so<br>FileUsage = 1<br>OPTION = 4194304<br><br></blockquote><div><br><b>/etc/odbc.ini </b><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
[asterisk-connector]<br>Description           = MySQL connection to &#39;asterisk&#39; database<br>Driver                = MySQL<br>Database              = asterisk<br>Server                = localhost<br>UserName              = root<br>
Password              = password<br>Port                  = 3306</blockquote><b><br><br>ASTERISK CDR</b>:<br><br><b>/etc/asterisk/res_odbc.conf</b><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
[asterisk]<br>enabled =&gt; yes<br>dsn =&gt; asterisk-connector<br>username =&gt; root<br>password =&gt; password<br>pre-connect =&gt; yes<br>pooling =&gt; no<br>limit =&gt; 1<br>connect_timeout =&gt; 1<br>idlecheck =&gt; 1<br>
</blockquote><div><br><b>/etc/asterisk/cdr_adaptive_odbc.conf  </b><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[mytable]<br>connection = asterisk<br>
table = asterisk_cdr<br></blockquote><div><br><b>/etc/asterisk/cdr.conf</b><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">[general]<br>enable = yes<br>
unanswered = yes<br></blockquote><div><br><br>Thanks for any hint! <br><br>Best regards<br>Stefan <br></div><div><br> </div></div></div></div>