<div dir="ltr"><div>Hi all,</div><div><br></div><div>I use astersk 11.7.0 on Ubuntu 12.04.01 TLS (i386). I use cdr_adaptive_odbc to write CDR to my MySQL's cdr table.</div><div>After my testing, this scenario is working well.</div>
<div><br></div><div>After a long idle time, I didn't make any call to the asterisk server. </div><div>When I try to make a call again after 8 hours, I found that the cdr lost. It cannot be inserted to cdr table.</div>
<div>Also, I could not find the insert CDR messages in the CLI at this period.</div><div><br></div><div>Could you please tell me which settings are wrong? Why dose my odbc connection not re-connect to MySQL automatically? </div>
<div><br></div><div><br></div><div>I checked the setting below:</div><div><br></div><div>CLI:</div><div>ubuntu*CLI> cdr show status </div><div><br></div><div>Call Detail Record (CDR) settings</div><div>----------------------------------</div>
<div> Logging: Enabled</div><div> Mode: Simple</div><div> Log unanswered calls: Yes</div><div> Log congestion: Yes</div><div><br></div><div>* Registered Backends</div>
<div> -------------------</div><div> cdr-custom</div><div> Adaptive ODBC</div><div> csv</div><div><br></div><div>ubuntu*CLI> odbc show all</div><div><br></div><div>ODBC DSN Settings</div><div>-----------------</div>
<div><br></div><div> Name: asterisk</div><div> DSN: asterisk-connector</div><div> Last connection attempt: 2014-01-11 18:16:40</div><div> Pooled: Yes</div><div> Limit: 1000</div><div> Connections in use: 0</div>
<div> </div><div> </div><div>-------------- /etc/asterisk/cdr.conf lists below: </div><div>[general]</div><div>enable=yes</div><div>unanswered = yes</div><div>congestion = yes</div><div>endbeforehexten=yes</div><div><br>
</div><div>[csv]</div><div>usegmtime=no ; log date/time in GMT. Default is "no"</div><div>loguniqueid=yes ; log uniqueid. Default is "no"</div><div>loguserfield=yes ; log user field. Default is "no"</div>
<div>accountlogs=yes ; create separate log file for each account code. Default is "yes"</div><div><br></div><div>-------------- /etc/odbc.ini</div><div>[asterisk-connector]</div><div>Description = MySQL connection to 'asterisk' database</div>
<div>Driver = MySQL</div><div>Database = mydatabase</div><div>Server = localhost</div><div>UserName = root</div><div>Password = mypassword</div><div>Port = 3306</div>
<div>Socket = /var/run/mysqld/mysqld.sock</div><div><br></div><div><br></div><div>-------------- /etc/asterisk/res_odbc.conf lists below: </div><div>[ENV]</div><div><br></div><div>[asterisk]</div><div>enabled => yes</div>
<div>dsn => asterisk-connector</div><div>password => mypassword</div><div>pre-connect => yes</div><div>sanitysql => select 1</div><div>pooling => yes</div><div>idlecheck => 30</div><div>share_connections => yes</div>
<div>limit => 1000</div><div>connect_timeout => 60</div><div>negative_connection_cache => 600</div><div><br></div><div><br></div><div>-------------- /etc/asterisk/cdr_adaptive_odbc.conf lists below: </div><div>[cdr]</div>
<div>connection=asterisk</div><div>table=cdr</div><div>alias start => calldate</div><div>alias phoneno => phoneno</div><div>alias userid => userid</div><div>alias callerid => callerid</div><div><br></div><div>
<div><br></div>-- <br>Best Regards<br>Charles<br>
</div></div>