Ricardo Melendez
2008-Sep-10 18:22 UTC
[asterisk-users] Write Asterisk CDR MySQL records to multiple servers
Hi to all, I actually have an asterisk server configured to write CDR mysql records in the same machine (localhost), but I want to write this records to another machine also in mysql at the same time, It is possible? It means that I want save the records in both machines. Thanks in advance. Ricardo Melendez -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080910/7786e9f6/attachment.htm
Vahan Yerkanian
2008-Sep-10 20:54 UTC
[asterisk-users] Write Asterisk CDR MySQL records to multiple servers
Ricardo Melendez wrote:> > Hi to all, I actually have an asterisk server configured to write CDR > mysql records in the same machine (localhost), but I want to write > this records to another machine also in mysql at the same time, It is > possible? It means that I want save the records in both machines. > >One way of doing is this is to setup the second machine as a MySQL slave for your current machine. You can specify which MySQL databases/tables you want to be mirrored, you can find lots of tutorials how to do this on the Web. HTH, Vahan
Tilghman Lesher
2008-Sep-10 21:01 UTC
[asterisk-users] Write Asterisk CDR MySQL records to multiple servers
On Wednesday 10 September 2008 13:22:51 Ricardo Melendez wrote:> Hi to all, I actually have an asterisk server configured to write CDR mysql > records in the same machine (localhost), but I want to write this records > to another machine also in mysql at the same time, It is possible? It > means that I want save the records in both machines.You can either use MySQL replication or you can use 2 different CDR drivers at the same time, such as ODBC, with the Mysql-ODBC-Connector and the MySQL CDR driver. Also, in 1.6, cdr_adaptive_odbc allows you to specify multiple CDR backends within the same configuration file. -- Tilghman
Andres
2008-Sep-11 02:17 UTC
[asterisk-users] Write Asterisk CDR MySQL records to multiple servers
Ricardo Melendez wrote:> Hi to all, I actually have an asterisk server configured to write CDR > mysql records in the same machine (localhost), but I want to write > this records to another machine also in mysql at the same time, It is > possible? It means that I want save the records in both machines. > > > > Thanks in advance. > > > > Ricardo Melendez >I would customize my own cdr_addon_mysql.so by editing cdr_addon_mysql.c and recompiling. It is fairly trivial to add a second MySQL server to the mix. The query is on line 248 and it is: if (mysql_real_query(&mysql, sqlcmd, strlen(sqlcmd))) { Just define another MySQL connection and insert an addicional query. Andres http://www.neuroredes.com>------------------------------------------------------------------------ > >_______________________________________________ >-- Bandwidth and Colocation Provided by http://www.api-digital.com -- > >AstriCon 2008 - September 22 - 25 Phoenix, Arizona >Register Now: http://www.astricon.net > >asterisk-users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >