[asterisk-users] Asterisk Database Handling

Mik Cheez michael_bulk at wildgate.com
Mon Jun 2 18:57:37 CDT 2008


Just wondering, but why are you using ODBC?  You can use the native 
MySQL driver that compiles in asterisk-addons, removing a layer of 
overhead, as well as potential issues with the ODBC driver.  Even 
better, if you're using a MySQL server on the same system as your 
Asterisk box, you can write directly to the socket rather than via IP.

Mik

Al Baker wrote:
> OK - but when * goes to "insert" the CDR Record, if the MYSQL connection 
> has "timed-out"
> shouldn't the Interace (I guess the ODBC) return an ERROR condition, 
> indicating that the
> SQL command FAILED ?  Shouldn't * recognize that and either RETRY 
> several times or LOG an Error ???
> 
> Jay R. Ashworth wrote:
>> On Wed, May 21, 2008 at 06:02:07PM -0400, Alex Balashov wrote:
>>   
>>> Douglas Garstang wrote:
>>>     
>>>> We are sending CDR's to MySQL via odbc. It seems that Asterisk is 
>>>> sometimes dropping CDR's, and they aren't being sent to the database 
>>>> (they ARE in the Master.csv file though). We suspect that when the MySQL 
>>>> socket is idle, it gets disconnected, either by the MySQL server or by 
>>>> our firewall, and when Asterisk goes to send the next CDR over the 
>>>> socket, does not re-open the database, and drops that CDR. Possibly on 
>>>> the next call, it connects ok and sends the next CDR.
>>>>       
>>> Isn't there a keepalive option somewhere for cdr_mysql.conf, or failing 
>>> that, a keepalive mechanism that can be enabled for TCP connections on 
>>> the server side?
>>>     
>> In some recent mysql update, the behaviour with which it times out
>> connections changed, and it bit some other project I follow as well;
>> MythTV, I think.  You might check their mailing list, Doug, for details.
>>
>> Cheers,
>> -- jra
>>   
> 
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 



More information about the asterisk-users mailing list