Re: [asterisk-users] Postgresql in Asterisk

2012-02-29 Thread Sergio Basurto
I finally solve the problem,

in gentoo the permission of dir /var/run/postgresql/ is:

drwxrwx--- 2 postgres postgres 4096 Feb 29 18:09 postgresql

so if we want to connect asterisk to postgresql, we need to add the user
that runs asterisk to the group postgres

and with this finally  I can connect with unixODBC to postgresql
database

I hope this help some one.

Regards,
On Mon, 2012-02-27 at 13:49 -0600, Sergio Basurto wrote:

 Thank you Jonathan,
 
 I already do the steps you mention, my configuration is:
 
 in res_odbc.conf
 
 enabled = yes
 dsn = asterisk-connector
 pre-connect = yes
 
 in odbc.ini
 
 [asterisk-connector]
 Description = PostgreSQL connection to 'asterisk' database
 Driver  = PostgreSQL
 Database= db_asterisk
 Servername= localhost
 UserName= asterisk
 Password= secret
 Port= 5432
 Protocol= 9.1
 ReadOnly= No
 RowVersioning   = No
 ShowSystemTables= No
 ShowOidColumn   = No
 FakeOidIndex= No
 ConnSettings=
 
 
 in odbcinst.ini
 
 [PostgreSQL]
 Description = ODBC for PostgreSQL
 Driver  = /usr/lib/libodbcpsql.so
 Setup   = /usr/lib/libodbcpsql.so
 FileUsage   = 1
 
 if I run with root:
 
 #echo select 1 | isql -v asterisk-connector
 
 returns 
 
 +---+
 | Connected!|
 |   |
 | sql-statement |
 | help [tablename]  |
 | quit  |
 |   |
 +---+
 SQL select 1
 ++
 | ?column?   |
 ++
 | 1  |
 ++
 SQLRowCount returns 1
 1 rows fetched
 
 This show me that it can connect, the thing is that in the asterisk
 logs it returns:
 
 res_odbc.c: Connecting asterisk
 res_odbc.c: res_odbc: Error SQLConnect=-1 errno=101 [unixODBC]Could
 not connect to the server;
 Could not connect to remote socket
 res_odbc.c: Failed to connect to asterisk
 res_odbc.c: Registered ODBC class 'asterisk' dsn-[asterisk-connector]
 res_odbc.c: res_odbc loaded.
 
 I notice that if I run the isql command with other user than root, it
 returns 
 
 [S1000][unixODBC]Could not connect to the server;
 Could not connect to remote socket.
 [ISQL]ERROR: Could not SQLConnect
 
 I guess is an extra configuration for ODBC that I am missing, what you
 think?
 
 Regards,
 
 On Fri, 2012-02-24 at 13:16 -0600, Jonathan Rose wrote: 
 
  You need to make sure ODBC is actually getting a connection made with your 
  database.
  
  What you should see under ODBC DSN settings:
  
Name:   asterisk
DSN:asterisk-connector
  Last connection attempt: WHATEVER
Pooled: No/Yes
Connected: Yes
  
  Connected: Yes is the important part.
  
  Remember, you need to have an account in postgres that can be logged into.  
  I made one on my machine with the following:
  
  name = asterisk
  password = secret
  
  And in /etc/odbc.ini, I have the following connector established:
  [asterisk-connector]
  Description = PostgreSQL connection to 'asterisk' database
  Driver  = PostgreSQL
  Database= asterisk
  Servername  = localhost
  UserName= asterisk
  Password= secret
  Port= 5432
  Protocol= 8.1   I'm guessing this will be 9.1 in your case
  ReadOnly= No
  RowVersioning   = No
  ShowSystemTables= No
  ShowOidColumn   = No
  FakeOidIndex= No
  ConnSettings=
  
  While my res_odbc.conf looks like this:
  
  [asterisk]
  enabled = yes
  dsn = asterisk
  pre-connect = yes
  
  In addition to having a connector defined, you need to have an ODBC adapter 
  for postgres.  I think this might come with ODBC byd efault though.  When I 
  was using mysql, I had to get a separate adapter to make it work and set 
  the path to it in Driver.  I don't think that is the case with pgsql though.
  
  Go ahead and post your extconfig.conf.  I'm guessing that the reason you 
  are able to post CDRs in spite of not having the Connected status show up 
  in your ODBC show is because you are connecting with res_pgsql.conf instead 
  of odbc.
  
  
  - Original Message -
  From: Sergio Basurto sbasu...@soft-gator.com
  To: asterisk-users@lists.digium.com
  Sent: Wednesday, February 22, 2012 6:54:47 AM
  Subject: Re: [asterisk-users] Postgresql in Asterisk
  
  
  On Wed, 2012-02-22 at 06:48 -0600, Sergio Basurto wrote: 
  
  
  Hello, 
  
  I install asterisk an postgresql 9.1 in gentoo, I already did the 
  configuration in both asterisk and postgresql, in fact If I make a call and 
  asterisk log it to CDR table, my question is: 
  I make a typo mistake I mean If I make a call asterisk already log it into 
  CDR table

Re: [asterisk-users] Postgresql in Asterisk

2012-02-27 Thread Sergio Basurto
Thank you Jonathan,

I already do the steps you mention, my configuration is:

in res_odbc.conf

enabled = yes
dsn = asterisk-connector
pre-connect = yes

in odbc.ini

[asterisk-connector]
Description = PostgreSQL connection to 'asterisk' database
Driver  = PostgreSQL
Database= db_asterisk
Servername= localhost
UserName= asterisk
Password= secret
Port= 5432
Protocol= 9.1
ReadOnly= No
RowVersioning   = No
ShowSystemTables= No
ShowOidColumn   = No
FakeOidIndex= No
ConnSettings=


in odbcinst.ini

[PostgreSQL]
Description = ODBC for PostgreSQL
Driver  = /usr/lib/libodbcpsql.so
Setup   = /usr/lib/libodbcpsql.so
FileUsage   = 1

if I run with root:

#echo select 1 | isql -v asterisk-connector

returns 

+---+
| Connected!|
|   |
| sql-statement |
| help [tablename]  |
| quit  |
|   |
+---+
SQL select 1
++
| ?column?   |
++
| 1  |
++
SQLRowCount returns 1
1 rows fetched

This show me that it can connect, the thing is that in the asterisk logs
it returns:

res_odbc.c: Connecting asterisk
res_odbc.c: res_odbc: Error SQLConnect=-1 errno=101 [unixODBC]Could not
connect to the server;
Could not connect to remote socket
res_odbc.c: Failed to connect to asterisk
res_odbc.c: Registered ODBC class 'asterisk' dsn-[asterisk-connector]
res_odbc.c: res_odbc loaded.

I notice that if I run the isql command with other user than root, it
returns 

[S1000][unixODBC]Could not connect to the server;
Could not connect to remote socket.
[ISQL]ERROR: Could not SQLConnect

I guess is an extra configuration for ODBC that I am missing, what you
think?

Regards,

On Fri, 2012-02-24 at 13:16 -0600, Jonathan Rose wrote: 

 You need to make sure ODBC is actually getting a connection made with your 
 database.
 
 What you should see under ODBC DSN settings:
 
   Name:   asterisk
   DSN:asterisk-connector
 Last connection attempt: WHATEVER
   Pooled: No/Yes
   Connected: Yes
 
 Connected: Yes is the important part.
 
 Remember, you need to have an account in postgres that can be logged into.  I 
 made one on my machine with the following:
 
 name = asterisk
 password = secret
 
 And in /etc/odbc.ini, I have the following connector established:
 [asterisk-connector]
 Description = PostgreSQL connection to 'asterisk' database
 Driver  = PostgreSQL
 Database= asterisk
 Servername  = localhost
 UserName= asterisk
 Password= secret
 Port= 5432
 Protocol= 8.1   I'm guessing this will be 9.1 in your case
 ReadOnly= No
 RowVersioning   = No
 ShowSystemTables= No
 ShowOidColumn   = No
 FakeOidIndex= No
 ConnSettings=
 
 While my res_odbc.conf looks like this:
 
 [asterisk]
 enabled = yes
 dsn = asterisk
 pre-connect = yes
 
 In addition to having a connector defined, you need to have an ODBC adapter 
 for postgres.  I think this might come with ODBC byd efault though.  When I 
 was using mysql, I had to get a separate adapter to make it work and set the 
 path to it in Driver.  I don't think that is the case with pgsql though.
 
 Go ahead and post your extconfig.conf.  I'm guessing that the reason you are 
 able to post CDRs in spite of not having the Connected status show up in your 
 ODBC show is because you are connecting with res_pgsql.conf instead of odbc.
 
 
 - Original Message -
 From: Sergio Basurto sbasu...@soft-gator.com
 To: asterisk-users@lists.digium.com
 Sent: Wednesday, February 22, 2012 6:54:47 AM
 Subject: Re: [asterisk-users] Postgresql in Asterisk
 
 
 On Wed, 2012-02-22 at 06:48 -0600, Sergio Basurto wrote: 
 
 
 Hello, 
 
 I install asterisk an postgresql 9.1 in gentoo, I already did the 
 configuration in both asterisk and postgresql, in fact If I make a call and 
 asterisk log it to CDR table, my question is: 
 I make a typo mistake I mean If I make a call asterisk already log it into 
 CDR table. 
 
 
 
 how can I make a function like the ones in func_odbc.conf for postgresql, if 
 I am using res_pgsql.conf instead of res_odbc.conf? 
 
 I also configure odbc and it connects with echo select 1 | isql -v 
 asterisk-connector with out problems, but when I try an odbc function or 
 restart asterisk it logs: 
 
 Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the server; 
 Could not connect to remote socket. 
 
 and the command 
 
 CLI odbc show 
 
 ODBC DSN Settings 
 - 
 
 Name: asterisk 
 DSN: asterisk-connector 
 Last connection attempt: 2012-02-22 06

Re: [asterisk-users] Postgresql in Asterisk

2012-02-24 Thread Jonathan Rose
You need to make sure ODBC is actually getting a connection made with your 
database.

What you should see under ODBC DSN settings:

  Name:   asterisk
  DSN:asterisk-connector
Last connection attempt: WHATEVER
  Pooled: No/Yes
  Connected: Yes

Connected: Yes is the important part.

Remember, you need to have an account in postgres that can be logged into.  I 
made one on my machine with the following:

name = asterisk
password = secret

And in /etc/odbc.ini, I have the following connector established:
[asterisk-connector]
Description = PostgreSQL connection to 'asterisk' database
Driver  = PostgreSQL
Database= asterisk
Servername  = localhost
UserName= asterisk
Password= secret
Port= 5432
Protocol= 8.1   I'm guessing this will be 9.1 in your case
ReadOnly= No
RowVersioning   = No
ShowSystemTables= No
ShowOidColumn   = No
FakeOidIndex= No
ConnSettings=

While my res_odbc.conf looks like this:

[asterisk]
enabled = yes
dsn = asterisk
pre-connect = yes

In addition to having a connector defined, you need to have an ODBC adapter for 
postgres.  I think this might come with ODBC byd efault though.  When I was 
using mysql, I had to get a separate adapter to make it work and set the path 
to it in Driver.  I don't think that is the case with pgsql though.

Go ahead and post your extconfig.conf.  I'm guessing that the reason you are 
able to post CDRs in spite of not having the Connected status show up in your 
ODBC show is because you are connecting with res_pgsql.conf instead of odbc.


- Original Message -
From: Sergio Basurto sbasu...@soft-gator.com
To: asterisk-users@lists.digium.com
Sent: Wednesday, February 22, 2012 6:54:47 AM
Subject: Re: [asterisk-users] Postgresql in Asterisk


On Wed, 2012-02-22 at 06:48 -0600, Sergio Basurto wrote: 


Hello, 

I install asterisk an postgresql 9.1 in gentoo, I already did the configuration 
in both asterisk and postgresql, in fact If I make a call and asterisk log it 
to CDR table, my question is: 
I make a typo mistake I mean If I make a call asterisk already log it into CDR 
table. 



how can I make a function like the ones in func_odbc.conf for postgresql, if I 
am using res_pgsql.conf instead of res_odbc.conf? 

I also configure odbc and it connects with echo select 1 | isql -v 
asterisk-connector with out problems, but when I try an odbc function or 
restart asterisk it logs: 

Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the server; Could 
not connect to remote socket. 

and the command 

CLI odbc show 

ODBC DSN Settings 
- 

Name: asterisk 
DSN: asterisk-connector 
Last connection attempt: 2012-02-22 06:45:36 


I will appreciate any help. 


Regards, 

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs: 
http://www.asterisk.org/hello asterisk-users mailing list
To UNSUBSCRIBE or update options visit: 
http://lists.digium.com/mailman/listinfo/asterisk-users 
-- 
Sergio Basurto  sbasu...@soft-gator.com  
Soft Gator S.A de C.V. 
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Postgresql in Asterisk

2012-02-22 Thread Sergio Basurto
Hello,

I install asterisk an postgresql 9.1 in gentoo, I already did the
configuration in both asterisk and postgresql, in fact If I make a call
and asterisk log it to CDR table, my question is:

how can I make a function like the ones in func_odbc.conf for
postgresql, if I am using res_pgsql.conf instead of res_odbc.conf?

I also configure odbc and it connects with echo select 1 | isql -v
asterisk-connector  with out problems, but when I try an odbc function
or restart asterisk it logs:

Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the server;
Could not connect to remote socket.

and the command

CLI odbc show

ODBC DSN Settings
-

  Name:   asterisk
  DSN:asterisk-connector
Last connection attempt: 2012-02-22 06:45:36


I will appreciate any help.


Regards,

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Postgresql in Asterisk

2012-02-22 Thread Sergio Basurto
On Wed, 2012-02-22 at 06:48 -0600, Sergio Basurto wrote:

 Hello,
 
 I install asterisk an postgresql 9.1 in gentoo, I already did the
 configuration in both asterisk and postgresql, in fact If I make a
 call and asterisk log it to CDR table, my question is:

I make a typo mistake I mean If I make a call asterisk already log it
into CDR table. 

 
 how can I make a function like the ones in func_odbc.conf for
 postgresql, if I am using res_pgsql.conf instead of res_odbc.conf?
 
 I also configure odbc and it connects with echo select 1 | isql -v
 asterisk-connector  with out problems, but when I try an odbc function
 or restart asterisk it logs:
 
 Error SQLConnect=-1 errno=101 [unixODBC]Could not connect to the
 server; Could not connect to remote socket.
 
 and the command
 
 CLI odbc show
 
 ODBC DSN Settings
 -
 
   Name:   asterisk
   DSN:asterisk-connector
 Last connection attempt: 2012-02-22 06:45:36
 
 
 I will appreciate any help.
 
 
 Regards,
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Sergio Basurto sbasu...@soft-gator.com
Soft Gator S.A de C.V.
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Postgresql Reconnect on connection failure

2011-09-23 Thread Eric Hiller

Currently if asterisk loses its connection to the postgresql it does not 
attempt to reconnect. I have searched all over for a setting that would have 
asterisk attempt to reconnect but I can not find anything. Is there something I 
am missing?

Thanks!
-Eric
  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Postgresql Reconnect on connection failure

2011-09-23 Thread Danny Nicholas
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Eric Hiller
Sent: Friday, September 23, 2011 1:29 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] Postgresql Reconnect on connection failure

 

Currently if asterisk loses its connection to the postgresql it does not
attempt to reconnect. I have searched all over for a setting that would have
asterisk attempt to reconnect but I can not find anything. Is there
something I am missing?

Thanks!
-Eric

 

So you like pain, huh?  Have you read this article?
http://climbing-the-hill.blogspot.com/2008/04/asterisk-realtime-architecture
.html 

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-14 Thread Edwin Quijada

I use Postgres always and it is wonderful. Never use mysql so if you want a 
real DB just use Postgres

*---* 
*-Edwin Quijada 
*-Developer DataBase 
*-JQ Microsistemas 

*-Soporte PostgreSQL

*-www.jqmicrosistemas.com
*-809-849-8087
*---*





 From: benny+use...@amorsen.dk
 To: brya...@zktech.com
 Date: Mon, 13 Sep 2010 20:24:25 +0200
 CC: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] PostgreSQL is asterisk friendly with it?
 
 Bryant Zimmerman brya...@zktech.com writes:
 
  As I look to move our systems to version 1.8 I am looking at making a
  change from mySQL to PostgreSQL.
 
  I love mySQL but am getting very concerned about i'ts new owners.
  Should I be able to move all my realtime stuff to PostgreSQL is it fully
  supported with asterisk?
 
 Yes. The ODBC drivers don't really care which database you access.
 
  Is there any down side to PostgreSQL over mySQL or will it be a big win?
 
 The only issue we have with Postgres is the dump/reload cycle when
 upgrading database version. This is being fixed in the latest versions
 though.
 
  Our database servers are linux but we access them from asterisk as well as
  windows are there any thing to be concerned with there?
 
 It works fine from Windows as well.
 
 
 /Benny
 
 
 -- 
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
  -- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Bryant Zimmerman
As I look to move our systems to version 1.8 I am looking at making a 
change from mySQL to PostgreSQL.

I love mySQL but am getting very concerned about i'ts new owners. 
Should I be able to move all my realtime stuff to PostgreSQL is it fully 
supported with asterisk?
Is there any down side to PostgreSQL over mySQL or will it be a big win?
Our database servers are linux but we access them from asterisk as well as 
windows are there any thing to be concerned with there?
I use c#, vb.net and mono to do a lot of our stuff are there any issues I 
should know about?

Thanks
Bryant

 
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Danny Nicholas
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bryant
Zimmerman
Sent: Monday, September 13, 2010 10:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] PostgreSQL is asterisk friendly with it?

 

As I look to move our systems to version 1.8 I am looking at making a
change from mySQL to PostgreSQL.

I love mySQL but am getting very concerned about i'ts new owners. 
Should I be able to move all my realtime stuff to PostgreSQL is it fully
supported with asterisk?
Is there any down side to PostgreSQL over mySQL or will it be a big win?
Our database servers are linux but we access them from asterisk as well as
windows are there any thing to be concerned with there?
I use c#, vb.net and mono to do a lot of our stuff are there any issues I
should know about?

Thanks
Bryant

In my experience, Asterisk plays much more nicely with MYSQL than
POSTGRESQL.  PostgreSQL is supported as ODBC vs NATIVE support for
MYSQL.  The downside that I'm aware of is that certain features of MYSQL
aren't directly portable to PostgreSQL (blobs for example).  Linux could
care less. IMO, Asterisk will be a larger hurdle than C#, vb.net or mono to
jump over.  This is all in 1.4/1.6; some changes may have modified these
answers regarding 1.8.





 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Vince Vielhaber
On Mon, 13 Sep 2010, Danny Nicholas wrote:

 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bryant
 Zimmerman
 Sent: Monday, September 13, 2010 10:47 AM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] PostgreSQL is asterisk friendly with it?



 As I look to move our systems to version 1.8 I am looking at making a
 change from mySQL to PostgreSQL.

 I love mySQL but am getting very concerned about i'ts new owners.
 Should I be able to move all my realtime stuff to PostgreSQL is it fully
 supported with asterisk?
 Is there any down side to PostgreSQL over mySQL or will it be a big win?
 Our database servers are linux but we access them from asterisk as well as
 windows are there any thing to be concerned with there?
 I use c#, vb.net and mono to do a lot of our stuff are there any issues I
 should know about?

 Thanks
 Bryant

 In my experience, Asterisk plays much more nicely with MYSQL than
 POSTGRESQL.  PostgreSQL is supported as ODBC vs NATIVE support for
 MYSQL.  The downside that I'm aware of is that certain features of MYSQL
 aren't directly portable to PostgreSQL (blobs for example).  Linux could
 care less. IMO, Asterisk will be a larger hurdle than C#, vb.net or mono to
 jump over.  This is all in 1.4/1.6; some changes may have modified these
 answers regarding 1.8.

Say what?   I just looked at the 1.4 sources and PostgreSQL is NOT
supported as ODBC.  Those are direct library calls into libpq.

Bryant, I've been using PostgreSQL with asterisk since I started using
asterisk a number of years ago.  There have been exactly ZERO issues
with it.

Vince.
-- 
   Michigan VHF Corp.   http://www.nobucks.net/   http://www.CDupe.com/

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Steve Kennedy
On Mon, Sep 13, 2010 at 12:31:55PM -0400, Vince Vielhaber wrote:

  change from mySQL to PostgreSQL.
  I love mySQL but am getting very concerned about i'ts new owners.
  Should I be able to move all my realtime stuff to PostgreSQL is it fully
[snippage and probably off topic]

Why are you worried re the future of MySQL and it's new owners Oracle.

 a) MySQL is open source so anyone can take a fork and continue
 development.

 b) Oracle own InnoDB already which is the main storage engine for
 MySQL.

 c) Oracle dont have any low end DB products for start-ups etc.
 Developer licenses may be free, but commercial use certainly isn't.

 d) MySQL is now a business division within Oracle and MySQL (.com)
 makes money.

 e) Google have contributed a lot of code for MySQL v6, I'm sure they'd
 take it on if Oracle in madness decided to drop it.

 f) I'm sure Oracle will push Oracle on Sun hardware/Solaris for high-end
 DB platforms and optimise the two so the performance stats look great
 and so they'll develop a migration platform so high-end MySQL users can
 easily migrate to Oracle when the need arises.


Steve

-- 
NetTek Ltd  UK mob +44 7775 755503
UK +44 20 7993 2612  /  US +1 310 857 7715  /  Fax +44 20 7483 2455
Skype/GoogleTalk/AIM/Gizmo/.Mac/Twitter/FriendFeed stevekennedyuk
Euro Tech News Blog http://eurotechnews.blogspot.com   MSN st...@gbnet.net

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Sherwood McGowan
I agree with Steve, I've had a couple of people speak with me about
concerns of MySQL's new ownership, but I stand by the same reasons
Steve doesMySQL will not be going anywhere, and if it does,
someone'll just fork and keep it going under a new name.



On Mon, Sep 13, 2010 at 11:46 AM, Steve Kennedy
steve-aster...@gbnet.net wrote:
 On Mon, Sep 13, 2010 at 12:31:55PM -0400, Vince Vielhaber wrote:

  change from mySQL to PostgreSQL.
  I love mySQL but am getting very concerned about i'ts new owners.
  Should I be able to move all my realtime stuff to PostgreSQL is it fully
 [snippage and probably off topic]

 Why are you worried re the future of MySQL and it's new owners Oracle.

  a) MySQL is open source so anyone can take a fork and continue
  development.

  b) Oracle own InnoDB already which is the main storage engine for
  MySQL.

  c) Oracle dont have any low end DB products for start-ups etc.
  Developer licenses may be free, but commercial use certainly isn't.

  d) MySQL is now a business division within Oracle and MySQL (.com)
  makes money.

  e) Google have contributed a lot of code for MySQL v6, I'm sure they'd
  take it on if Oracle in madness decided to drop it.

  f) I'm sure Oracle will push Oracle on Sun hardware/Solaris for high-end
  DB platforms and optimise the two so the performance stats look great
  and so they'll develop a migration platform so high-end MySQL users can
  easily migrate to Oracle when the need arises.


 Steve

 --
 NetTek Ltd  UK mob +44 7775 755503
 UK +44 20 7993 2612  /  US +1 310 857 7715  /  Fax +44 20 7483 2455
 Skype/GoogleTalk/AIM/Gizmo/.Mac/Twitter/FriendFeed stevekennedyuk
 Euro Tech News Blog http://eurotechnews.blogspot.com   MSN st...@gbnet.net

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] PostgreSQL is asterisk friendly with it?

2010-09-13 Thread Benny Amorsen
Bryant Zimmerman brya...@zktech.com writes:

 As I look to move our systems to version 1.8 I am looking at making a
 change from mySQL to PostgreSQL.

 I love mySQL but am getting very concerned about i'ts new owners.
 Should I be able to move all my realtime stuff to PostgreSQL is it fully
 supported with asterisk?

Yes. The ODBC drivers don't really care which database you access.

 Is there any down side to PostgreSQL over mySQL or will it be a big win?

The only issue we have with Postgres is the dump/reload cycle when
upgrading database version. This is being fixed in the latest versions
though.

 Our database servers are linux but we access them from asterisk as well as
 windows are there any thing to be concerned with there?

It works fine from Windows as well.


/Benny


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] PostgreSQL problems

2009-10-14 Thread David A. Bandel
Folks,

I know this must be a configuration problem.  Just changed servers
last nite -- an interim server running 1.6.1.6.  Copied all of
/etc/asterisk to the new server and fired it up.

Now I'm getting:
[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:309 pgsql_log: Failed to
insert call detail record into database!
[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:310 pgsql_log: Reason:
ERROR:  syntax error at or near )
LINE 1: INSERT INTO cdr ) VALUES )
^

[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:311 pgsql_log: Connection
may have been lost... attempting to reconnect.
[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:314 pgsql_log: Connection
reestablished.
[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:320 pgsql_log: HARD ERROR!
Attempted reconnection failed.  DROPPING CALL RECORD!
[Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:321 pgsql_log: Reason:
ERROR:  syntax error at or near )
LINE 1: INSERT INTO cdr ) VALUES )

any clues appreciated.

Thanx,

David A. Bandel
-- 
Focus on the dream, not the competition.
- Nemesis Air Racing Team motto
Visit my blog at: http://www.pananix.com/cgi-bin/blosxom

___
-- 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


Re: [asterisk-users] PostgreSQL problems

2009-10-14 Thread Roderick A. Anderson
David A. Bandel wrote:
 Folks,
 
 I know this must be a configuration problem.  Just changed servers
 last nite -- an interim server running 1.6.1.6.  Copied all of
 /etc/asterisk to the new server and fired it up.

Local or remote PostgreSQL server?

Is the new Asterisk server allowed to connect to the PostgreSQL 
database.  Iptables or pg_hba.conf on a remote system.


\\||/
Rod
-- 
 
 Now I'm getting:
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:309 pgsql_log: Failed to
 insert call detail record into database!
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:310 pgsql_log: Reason:
 ERROR:  syntax error at or near )
 LINE 1: INSERT INTO cdr ) VALUES )
 ^
 
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:311 pgsql_log: Connection
 may have been lost... attempting to reconnect.
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:314 pgsql_log: Connection
 reestablished.
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:320 pgsql_log: HARD ERROR!
 Attempted reconnection failed.  DROPPING CALL RECORD!
 [Oct 14 12:28:10] ERROR[8471]: cdr_pgsql.c:321 pgsql_log: Reason:
 ERROR:  syntax error at or near )
 LINE 1: INSERT INTO cdr ) VALUES )
 
 any clues appreciated.
 
 Thanx,
 
 David A. Bandel


___
-- 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


[asterisk-users] PostgreSQL CDRs 1.6 (was: Re: 1.6 upgrade issues)

2008-12-17 Thread Philipp Kempgen
Chris Bagnall schrieb:

 Also seem to be getting some errors writing CDRs to a postgresql database.

What errors precisely?
How can you tell?

 I'm using the schema for pgsql from voip-info.org, which, again, has worked 
 fine logging 1.2 and 1.4. Have there been any schema changes in 1.6 one needs 
 to be aware of?


   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  -  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] PostgreSQL query results truncated 255 characters

2008-01-17 Thread vcomp
I am querying an postgresql database from my 1.4.13 system and the results
seem to be truncating each column at 255 characters.  The columns are typed
as character varying 1000.

Any suggestion on how to remove this limit?

TIA

Vic
___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] PostgreSQL

2004-06-07 Thread Stuart Grimshaw
On Sun, 06 Jun 2004 17:57:19 -0400, mag0007 [EMAIL PROTECTED] wrote:
Is there an interface for postgresql and asterisk?
It depends what you want to do with Asterisk  PostgreSQL, There is a
whole host of info on the mailing list archive about PostgreSQL:
http://tinyurl.com/328m8
There's also some info on www.voip-info.org
--
-S
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] PostgreSQL

2004-06-06 Thread mag0007
Is there an interface for postgresql and asterisk?
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] PostgreSQL

2004-06-06 Thread Steven Critchfield
On Sun, 2004-06-06 at 16:57, mag0007 wrote:
 Is there an interface for postgresql and asterisk?

Did you even do a minor amount of research before you gave up to ask a
documented question?
-- 
Steven Critchfield [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] PostgreSQL

2004-05-26 Thread Fabio Donaggio
Hi to all!!

Here's my problem:

[cdr_pgsql.so] = (PostgreSQL CDR Backend)
  == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
Unable to connect to database server localhost.
Calls will not be logged!
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
Reason: could not connect to server:
Connection refused
Is the server running on localhost and accepting
TCP/IP connections on port 5432?

Anyone can help me??? Anyone have some suggest about this or about how to
connect PostgreSQL to Asterisk???
Thanks!

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] PostgreSQL

2004-05-26 Thread Murali Krishnan
Dear,
Check whether you have enable
tcp/ip socket connection in your Postgres config.
postgresql.conf,
if yes, see whether u have respective user and password strategy 'trust'.

Fabio Donaggio wrote:
Hi to all!!
Here's my problem:
[cdr_pgsql.so] = (PostgreSQL CDR Backend)
  == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
Unable to connect to database server localhost.
Calls will not be logged!
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
Reason: could not connect to server:
Connection refused
Is the server running on localhost and accepting
TCP/IP connections on port 5432?
Anyone can help me??? Anyone have some suggest about this or about how to
connect PostgreSQL to Asterisk???
Thanks!
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] PostgreSQL

2004-05-26 Thread Steven Critchfield
On Wed, 2004-05-26 at 08:40, Fabio Donaggio wrote:
 Hi to all!!
 
 Here's my problem:
 
 [cdr_pgsql.so] = (PostgreSQL CDR Backend)
   == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
 May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
 Unable to connect to database server localhost.
 Calls will not be logged!
 May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
 Reason: could not connect to server:
 Connection refused
 Is the server running on localhost and accepting
 TCP/IP connections on port 5432?
 
 Anyone can help me??? Anyone have some suggest about this or about how to
 connect PostgreSQL to Asterisk???
 Thanks!

Seems it told you pretty clear that it could not establish a connection
to your postgresql server. I suggest you start by checking that it is
running, that it is accessible via TCP/IP(maybe use nmap), and that you
can connect to it with 'psql -h localhost'. 

Most likely you are not configured to answer TCP/IP. Look in
/etc/postgresql/postgresql.conf for something like 'tcpip_socket = true'
and 'port = 5432'. You may also need to have '-i' in POSTMASTER_OPTIONS
under postmaster.conf. There is still the possibility then that you
don't have the proper pg_hba.conf entry to allow connects in. Don't
forget to restart postgres after your config changes so they take
effect. I'm not sure how much it will allow to change when you kill -HUP
it.
-- 
Steven Critchfield  [EMAIL PROTECTED]

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] PostgreSQL

2004-05-26 Thread C. Maj
On Wed, 26 May 2004, Fabio Donaggio waxed:

 Hi to all!!
 
 Here's my problem:
 
 [cdr_pgsql.so] = (PostgreSQL CDR Backend)
   == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
 May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
 Unable to connect to database server localhost.
 Calls will not be logged!
 May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
 Reason: could not connect to server:
 Connection refused
 Is the server running on localhost and accepting
 TCP/IP connections on port 5432?
 
 Anyone can help me??? Anyone have some suggest about this or about how to
 connect PostgreSQL to Asterisk???
 Thanks!

You need to make sure that PostgreSQL is running with the
'-i' option for net connections OR that postgresql.conf
contains the line 'tcpip_socket = 1'

Are you sure that PostgreSQL is running on the same machine
that Asterisk is running on ?  How did you connect to the
database to create the CDR table initially ?

--Chris


-- 
Chris Maj, Rochester
cmaj_at_freedomcorpse_dot_com
Pronunciation Guide: Maj == May
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] PostgreSQL

2004-05-26 Thread Brian Cuthie
Fabio,
You need to enable tcp connectivity on psql. Wherever you configured the 
databases to live (/var/lib/pgsql/data on my machine) you'll find a file 
called postgres.conf. You need to read that and uncomment out the 
appropriate lines to get:

   tcpip_socket = true
   port = 5432
-brian
Fabio Donaggio wrote:
Hi to all!!
Here's my problem:
[cdr_pgsql.so] = (PostgreSQL CDR Backend)
 == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:298 my_load_module: cdr_pgsql:
Unable to connect to database server localhost.
Calls will not be logged!
May 26 17:21:35 ERROR[16384]: cdr_pgsql.c:299 my_load_module: cdr_pgsql:
Reason: could not connect to server:
Connection refused
   Is the server running on localhost and accepting
   TCP/IP connections on port 5432?
Anyone can help me??? Anyone have some suggest about this or about how to
connect PostgreSQL to Asterisk???
Thanks!
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
 

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users