Un-top-posting...

[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Gustavo A Gonzalez Sent: Thursday, June 04, 2009 10:23 AM

Hi all! I?m not sure if it is the correct place but, I?ve five boxes running asterisk and each one with his own cdr mysql database. What Im looking for is to get a core CDR system that holds information stored on each asterisk server. Have you any suggestion/process to accomplish that?. Thanks!!!

On Thu, 4 Jun 2009, Danny Nicholas wrote:

Do you want a "live repository" or just a common gathering of the data? If LR then you should set up a deamon on each box to transfer records as they occur using something like the DBI functionality of PERL. If not, then just do a mysql dump periodically and ssh the files to the common server.

A few snippets from a production script...

# mark the records to be exported
        mysql ${USER_AUTH}\
                --database example\
                --execute="update cdrs set disposition = 'EXPORTING'"

# dump the cdrs
        mysqldump\
                ${USER_AUTH}\
                --skip-opt\
                --no-create-info\
                --where="disposition = 'EXPORTING'"\
                example\
                cdrs\
                >${HOST_DOMAIN}.sql

# compress the dump file
        gzip ${HOST_DOMAIN}.sql
        mv ${HOST_DOMAIN}.sql.gz ${HOST_DOMAIN}.sql.gz-${DATE}

# scp the compressed dump file
        scp ${HOST_DOMAIN}.sql.gz-${DATE} exam...@example.com

# delete the exported records
        mysql ${USER_AUTH}\
                --database example\
                --execute="delete cdrs where disposition = 'EXPORTING'"

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000
_______________________________________________
-- 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

Reply via email to