[asterisk-dev] CDR on multiple database servers - getting rid of duplicates

Leandro Dardini ldardini at gmail.com
Tue Aug 20 10:11:51 CDT 2013


2013/8/20 Walter Doekes <walter+asterisk-dev at osso.nl>

> On 20/08/13 12:24, Leandro Dardini wrote:
>
>> I am running a cluster of asterisk servers and each one is writing the
>> CDR to 2 mysql servers configured with multi master replication using
>> the cdr_adaptive_odbc driver.
>>
>
> [...]
>
>
>  As you can imagine, if both mysql servers are available, every CDR is
>> written twice.
>>
>
> Without going into detail here: if you're writing to two databases always,
> you're not using your multi-master setup right.
>
> A second server should be consulted only if the first one isn't available.
>
> Cheers,
> Walter
>

Yes, I agree with you about using the second database only if the first is
not available, but unfortunately the cdr_odbc_adaptive driver I am using is
not working that way. While other part of asterisk, like the func_odbc can
be configured to use a primary/backup odbc connection, there is no way to
do it with cdr_odbc_adaptive or am I wrong?

I have already made a little patch to allow for an additional parameter in
cdr_odbc_adaptive.conf to drive the usage of INSERT IGNORE instead of just
INSERT. I know it will be a lots better to have a working active/backup
configuration for cdr_odbc_adaptive, but making that patch is beyond my
reach right now.

I just was checking if there was any interest in receiving the little
"INSERT IGNORE" patch...

Leandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130820/d38e9d93/attachment.htm>


More information about the asterisk-dev mailing list