O'Reilly logo

FreeSWITCH Cookbook by Raymond Chandler, Darren Schreiber, Michael S Collins, Anthony Minessale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inserting CDRs into a backend database

Frequently it is necessary to put CDR information into a database such as MySQL, PostgreSQL, or other SQL databases. FreeSWITCH does not support writing CDRs directly to a database (the decision not to write directly to a database is an engineering, not a technical limitation). This recipe discusses the simple method of writing SQL-based CSV files and then using those to update a backend database.

Getting ready

Of course, you will need a database in which to store your files. Any SQL-compliant database will work as long as you can use the command line to execute SQL statements. Create a database for your CDRs and allow any necessary access. This is completely dependent upon the type of database you have—consult ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required