Hello I have installed postgres and asterisk on centos. I confused which module i have to install to store CDR info to postgres DB. I have visited some links but mostly are for configuration file in database. I only want CDR to Database not the configuration files for time being Please help -- Best Regards Shakeel Abbas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090831/b87eba26/attachment.htm
I am following this procedure ou 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 but when i execute this ./configure --with-postgres=<dir where postgresql is installed> it gives an error for missing an pg_config file ..... i searched the PC but it really dont exists..... but database server is fine and working OK! what to do in this situation On Mon, Aug 31, 2009 at 10:17 AM, ABBAS SHAKEEL <shakeel.abbas.qau at gmail.com> wrote:> Hello > > I have installed postgres and asterisk on centos. > > I confused which module i have to install to store CDR info to postgres > DB. > > I have visited some links but mostly are for configuration file in > database. I only want CDR to Database not the configuration files for time > being > > Please help > > -- > Best Regards > Shakeel Abbas > >-- Best Regards Shakeel Abbas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090831/3248e54a/attachment.htm
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ABBAS SHAKEEL wrote:> but when i execute this ./configure --with-postgres=<dir where > postgresql is installed> > > it gives an error for missing an pg_config file ..... i searched the PC > but it really dont exists..... but database server is fine and working OK! > > what to do in this situationYou should have the following packages installed on your Asterisk system postgresql-libs postgresql-devel postgresql If the database is on the same box, include: postgresql-server If you want to hit the database from the dialplan for any reason, include: postgresql-odbc Once you install these, be sure to rerun ./configure Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKm8rOCFu3bIiwtTARAijbAJ4vt0DVZJYUPRhPrNpXm2KEngRmxACgn24T aHtpBzyGhPBmw8a4veqdLhQ=TI+m -----END PGP SIGNATURE-----
Thanks alot Barry this was really helpful Can i know which querry is executed to insert record to database... i am asking this because of [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:309 pgsql_log: Failed to insert call detail record into database! [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:310 pgsql_log: Reason: ERROR: syntax error at or near ")" at character 17 [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:311 pgsql_log: Connection may have been lost... attempting to reconnect. [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:314 pgsql_log: Connection reestablished. [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:320 pgsql_log: HARD ERROR! Attempted reconnection failed. DROPPING CALL RECORD! On Mon, Aug 31, 2009 at 6:06 PM, Barry L. Kline <blkline at attglobal.net>wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > ABBAS SHAKEEL wrote: > > > but when i execute this ./configure --with-postgres=<dir where > > postgresql is installed> > > > > it gives an error for missing an pg_config file ..... i searched the PC > > but it really dont exists..... but database server is fine and working > OK! > > > > what to do in this situation > > You should have the following packages installed on your Asterisk system > > postgresql-libs > postgresql-devel > postgresql > > If the database is on the same box, include: > postgresql-server > > If you want to hit the database from the dialplan for any reason, include: > > postgresql-odbc > > Once you install these, be sure to rerun ./configure > > Barry > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > > iD8DBQFKm8rOCFu3bIiwtTARAijbAJ4vt0DVZJYUPRhPrNpXm2KEngRmxACgn24T > aHtpBzyGhPBmw8a4veqdLhQ> =TI+m > -----END PGP SIGNATURE----- > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2009 - October 13 - 15 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Best Regards Shakeel Abbas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090901/c253a4bc/attachment.htm
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ABBAS SHAKEEL wrote:> Can i know which querry is executed to insert record to database... > > i am asking this because of > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:309 pgsql_log: Failed to > insert call detail record into database! > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:310 pgsql_log: Reason: > ERROR: syntax error at or near ")" at character 17 > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:311 pgsql_log: Connection > may have been lost... attempting to reconnect. > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:314 pgsql_log: Connection > reestablished. > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:320 pgsql_log: HARD ERROR! > Attempted reconnection failed. DROPPING CALL RECORD! >Which version of Asterisk are you using? Did you create the PG database for Asterisk? Have you confirmed that you can connect to it using the CLI psql with the appropriate credentials? There are a few steps ahead of where you are before we worry about this particular problem. Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKnRL4CFu3bIiwtTARAnwNAJ9+CiWdtq17DRSqelNl7bsN5pS32gCeIn+l VNyWYBauMOBvVMhyGUeP/Pk=G9NP -----END PGP SIGNATURE-----
Hello Barry I am using asterisk 1.6.1.2 ... Yeah the database was created at that time ..... because if the database is not created then it gives another error i remeber like .. database not found or not accepting connections... The problem is solved automatically ... I have done nothing (restart etc not included in nothing ;)....).... It is working fine Thanks On Tue, Sep 1, 2009 at 5:26 PM, Barry L. Kline <blkline at attglobal.net>wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > ABBAS SHAKEEL wrote: > > > Can i know which querry is executed to insert record to database... > > > > i am asking this because of > > > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:309 pgsql_log: Failed to > > insert call detail record into database! > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:310 pgsql_log: Reason: > > ERROR: syntax error at or near ")" at character 17 > > > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:311 pgsql_log: Connection > > may have been lost... attempting to reconnect. > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:314 pgsql_log: Connection > > reestablished. > > [Sep 1 12:46:09] ERROR[19498]: cdr_pgsql.c:320 pgsql_log: HARD ERROR! > > Attempted reconnection failed. DROPPING CALL RECORD! > > > > > Which version of Asterisk are you using? Did you create the PG database > for Asterisk? Have you confirmed that you can connect to it using the > CLI psql with the appropriate credentials? > > There are a few steps ahead of where you are before we worry about this > particular problem. > > Barry > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > > iD8DBQFKnRL4CFu3bIiwtTARAnwNAJ9+CiWdtq17DRSqelNl7bsN5pS32gCeIn+l > VNyWYBauMOBvVMhyGUeP/Pk> =G9NP > -----END PGP SIGNATURE----- > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > AstriCon 2009 - October 13 - 15 Phoenix, Arizona > Register Now: http://www.astricon.net > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Best Regards Shakeel Abbas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090902/1c14fab1/attachment.htm