Thanks Lonnie Yes I have been writing a billing tab for a hotel and its not only much much faster, its actually much easier so sqlite3 is now my standard. I do it using your option 2. Looks like I will need to test it out.
Regards Michael Knill On 2 Jul 2015, at 11:20 pm, Lonnie Abelbeck <li...@lonnie.abelbeck.com> wrote: Hi Michael, In case you were not aware, there are two ways to log CDR's using sqlite3 in Asterisk. 1) cdr_sqlite3_custom Older solution with sqlite3 built into Asterisk. 2) cdr_adaptive_odbc Newer, more general solution, where the unixodbc sqlite3 driver is used. CDR Call Logging with SQL http://doc.astlinux.org/userdoc:tt_asterisk-odbc#cdr_call_logging_with_sql Personally I log using both cdr_custom (csv) and cdr_adaptive_odbc (sqlite3). The web interface's SQL-Data tab will view either standard cdr_sqlite3_custom or cdr_adaptive_odbc database file. As for trimming the sqlite3 database file, I have not needed to do this yet, but a DELETE query would do it... will it work while Asterisk is running, I'm not sure. But a large sqlite3 database is more manageable than a simple text file. Here is one data point (on a D525 Atom box)... # ls -l /mnt/kd/cdr-sqlite3/cdr-odbc.sqlite3 -rw-r--r-- 1 root root 1233920 Jul 1 15:15 /mnt/kd/cdr-sqlite3/cdr-odbc.sqlite3 SQL-Data tab == [Table] cdr | Showing rows 0 - 29, Total: 6142 (Query took 0.0019 sec) [View] standard | Showing rows 0 - 29, Total: 6142 (Query took 0.1281 sec) -- Query used to create this view CREATE VIEW 'standard' AS SELECT calldate, clid, dst, dcontext, billsec, userfield from cdr ORDER BY calldate DESC -- == Lonnie On Jul 1, 2015, at 11:40 PM, Michael Knill <michael.kn...@ipcsolutions.com.au> wrote: > Hi group > > I have decided to use sqlite for cdr recording as its sooo much faster than > csv. > > Im just concerned about managing database size. What is the best way to do > this? Cron query? Is it already being done? > > Regards > Michael Knill ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.