Using MySQL on another server

Hi

Is it possible to have Freepbx use a remote MySQL install rather than the local one? Or, perhaps, write to both the local and remote?

We have a dev who wants to access the MySQL logs so that he can integrate call records with their custom sales tool. We would rather he didn’t run queries directly against (or on) the freepbx server itself and he doesn’t want to use the asterisk manager event output on port 5038. So the compromise is to see whether we can get asterisk to write the MySQL stuff to another box, against which the dev can run his queries.

I’d also be interested to hear your experience on whether running MySQL queries against the local mysql install on a freepbx server will adversely affect the performance of the voip box. This is a server which will handle 5000 to 10000 calls a day, 100ish users with call recording and a smidge of conferencing stuff.

Olly

Very easy to do:-

http://www.voip-info.org/wiki/view/Asterisk+config+cdr_mysql.conf

Your “local” cdr reporting will need to be fixed to read also from the external mysql server. Or have the external server update itself from the local server as appropriate.

each cdr record written takes a mysql insert query, 10000 a day is not a problem.

Great. Thanks. Local CDR reporting isn’t a concern as we have a separate reporting tool which uses the CDR events from the asterisk manager.

Can I ask, if you have an important voip box, with those kind of user levels, would you let a dev have MySQL access to it, or would you keep him at arms length?

Olly

no harm in creating a limited user with read only access from a particular IP or network to the asteriskcdrdb database.

I suppose I was meaning more, whether any kind of sql queries they would run would impact on the phone server performance. I suppose the only way of knowing is trying it.

I don’t know what queries you will be making, but I query all my servers every minute from a management box that aggregates all “expensive calls” and subsequently emails when usage “looks suspicious” or call volume is outside (high or low) expectations. The impact is negligible.