login | register
Sat 17 of May, 2008 [05:20 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.40s
  • Memory usage: 2.20MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.50

Asterisk cdr pgsql

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

Installation of PostgresQL on Fedora Core 4

yum -y install postgresql postgresql-server php-pgsql

I had to modify the above file manually

Compiling cdr_pgsql.so

When using 1.2.X:
If you have the Postgresql libraries installed (the postgresql-devel rpm), they will be detected when you build asterisk and cdr_pgsql.o will be compiled and put in your module path with 'make install'.
You may have to modify the MODS line in the cdr/Makefile to include cdr_pgsql.so.

 MODS=cdr_pgsql.so cdr_csv.so cdr_manager.so

When using 1.4.X :
you have to compile asterisk with the cdr_pgsql.o module, for this follow the steps:

Configure asterisk with postgresql support:
./configure --with-postgres=<dir where postgresql is installed>

Then issue the command:
make menuconfig

in the menu select 2.Call Detail Recording -> then check cdr_pgsql
build asterisk
make

Install it
sudo make install

Then add, in the file modules.conf, the line:
load => cdr_pgsql.so


Create the database

Create a database named 'asterisk' using the Postgresql schema described in Asterisk cdr odbc.

Edit the configuration file

A sample cdr_pgsql.conf file is included with Asterisk - you should find it in /etc/asterisk. Uncomment out the necessary lines and ensure that they point to your Postgresql database.

Sample setup

Make sure postmaster is running with the -i flag to enable tcp connections. Also the user that asterisk will use to connect needs to have insert permission on the cdr table.

Sample cdr_pgsql.conf file
[global]
hostname=localhost
port=5432
dbname=asterisk
password=cdrstuff
user=asterisk

Create the database
createdb asterisk

Create the CDR table
You can find the script for this in the Asterisk source folder, in contrib/scripts. It's called "postgres_cdr.sql". Just paste it in the pgsql command line.

Create the user
createuser -A -D -P asterisk
Enter password for new user:
Enter it again:
CREATE USER

Grant insert access to the userl:
grant INSERT on cdr to asterisk;

Now reload/restart asterisk and loggin should work, if it doesn't work check for error messages in the asterisk log.



Bug #4909 - Adds support for a "spool file"
Add the following line to your cdr_pgsql.conf file:

spool=pgsql.spool

If the connection can not be made to the sql server, it will spool insert commands to pgsql.spool in /var/log/asterisk until it can reconnect
Created by jametrel, Last modification by Juan P on Tue 20 of Nov, 2007 [05:34 UTC]

Comments Filter

cdr table: additional permissions in PostgreSQL 8.1.X

by Michael Lang on Saturday 14 of April, 2007 [16:09:53 UTC]
If you just use GRANT to allow INSERT to the user asterisk, with PostgreSQL 8.1.X (I used 8.1.8) you will get an error from the asterisk server similar to:

  Apr 14 16:49:59 ERROR[6661]: cdr_pgsql.c:154 pgsql_log: cdr_pgsql: Failed to insert call detail record into database!
  Apr 14 16:49:59 ERROR[6661]: cdr_pgsql.c:155 pgsql_log: cdr_pgsql: Reason: ERROR:  permission denied for sequence cdr_acctid_seq.

In such cases, you need to add additonal permissions to the user asterisk for the sequence "cdr_acctid_seq" that is created upon the creation of the "AcctId BIGSERIAL PRIMARY KEY" counter in the table "cdr". You only need to grant UPDATE to asterisk for this sequence by typing

  GRANT UPDATE ON cdr_acctid_seq TO asterisk;

at e.g. the psql prompt (as user postgres) and asterisk resumes logging.

Re: Table creation script

by Petar on Saturday 28 of January, 2006 [00:35:13 UTC]
Also, don't forget to grant privileges on the cdr_acctid_seq sequence to the asterisk user....

Table creation script

by Freeze Styler on Tuesday 04 of October, 2005 [06:53:53 UTC]
Before running "grant INSERT on cdr to asterisk;" you should run the script that actually creates the CDR table.
You can find it in the Asterisk source folder, in contrib/scripts. It's called "postgres_cdr.sql".
Edit

Filename Correction

by Anonymous on Tuesday 21 of December, 2004 [14:21:39 UTC]
The correct filename is cdr_pgsql.so isn't it?


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