login | register
Sat 17 of May, 2008 [07:19 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.36s
  • Memory usage: 2.18MB
  • Database queries: 29
  • GZIP: Disabled
  • Server load: 0.62

Asterisk cdr SQLite

cdr_sqlite

Asterisk can store CDR records in a SQLite database, as an alternative to CSV text files and other database formats.

Compiling cdr_sqlite.so

The module will automatically compile if you have the SQLite library and header files installed.

Create the database

The database table 'cdr' will be automatically created in /var/log/asterisk/cdr.db. There is only one (implicit) key in this table, on the auto-incrementing AcctId. If you need indizes to speed up your queries, you can create them manually like in the following example:

$ sqlite /var/log/asterisk/cdr.db
SQLite version 2.8.14
Enter ".help" for instructions
sqlite> create index cdr_src on cdr (src);
sqlite> create index cdr_dst on cdr (dst);

Edit the configuration file

There is no config file for SQLite. It's so simple, that you won't need one.

Database Location

Unless you modified the source code, the database can be found at
/var/log/asterisk/cdr.db
If you have sqlite installed, you can query the database by typing
sqlite /var/log/asterisk/cdr.db

Database Structure

The database contains a single table called "cdr".

Field Name Type
AcctId INTEGER PRIMARY KEY
clid VARCHAR(80)
src VARCHAR(80)
dsst VARCHAR(80)
dcontext VARCHAR(80)
channel VARCHAR(80)
dstchannel VARCHAR(80)
lastapp VARCHAR(80)
lastdata VARCHAR(80)
start CHAR(19)
answer CHAR(19)
end CHAR(19)
duration INTEGER
billsec INTEGER
disposition INTEGER
amaflags INTEGER
accountcode INTEGER



Enable Userfield and uniqueid database fields if you need them

Userfield and uniqueid are sometime useful fields but i realized that they are not enabled by default (at least in asterisk-cvs), so in order to have them written to the cdr table you have to
edit the file cdr_sqlite.c like in the following aexample:

  1. define LOG_UNIQUEID 1
  2. define LOG_USERFIELD 1

and recompile asterisk. Also, if autoload is not enabled in your modules.conf you should add the line:

load => cdr_sqlite.so

to your modules.conf.


Related Software

astCDRview:

astCDRview is an open source, licensed under GNU/GPL, lightweight, Web-based, multi-language Asterisk SQLite CDR viewer that supports multiple outgoing carriers, multiple incoming numbers, billing, an address book, and extensions



See also

Created by schurig, Last modification by Mike on Sat 03 of May, 2008 [13:50 UTC]

Comments Filter
Edit

How to install?

by Anonymous on Saturday 10 of July, 2004 [12:00:30 UTC]
Could you please explain how to install?


Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver