[Asterisk-Users] Asterisk with PostgreSQL

Neil Cherry ncherry at comcast.net
Thu Jun 24 07:11:46 MST 2004


Caleb Kow wrote:
> Hello Everybody,
> 
> I am trying to configure Asterisk to listen into a database which is
> created in PostgreSQL. Whenever asterisk starts up, it is unable to
> connect to the pg database and gives the following error:
> 
>  [cdr_pgsql.so] => (PostgreSQL CDR Backend)
>   == Parsing '/etc/asterisk/cdr_pgsql.conf': Found
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:284 my_load_module:
> cdr_pgsql: got hostname of localhost
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:285 my_load_module:
> cdr_pgsql: got port of 5432
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:288 my_load_module:
> cdr_pgsql: got user of asteriskpg
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:289 my_load_module:
> cdr_pgsql: got dbname of asteriskpgcdr
> Jun 24 21:20:53 DEBUG[1074494336]: cdr_pgsql.c:290 my_load_module:
> cdr_pgsql: got password of 65plesk
> Jun 24 21:20:53 ERROR[1074494336]: cdr_pgsql.c:298 my_load_module:
> cdr_pgsql: Unable to connect to database server localhost.  Calls will
> not be logged!
> Jun 24 21:20:53 ERROR[1074494336]: cdr_pgsql.c:299 my_load_module:
> cdr_pgsql: Reason: could not connect to server: Connection refused
>         Is the server running on host localhost and accepting
>         TCP/IP connections on port 5432?
> 
> However, the strange thing is that when I try to connect to this
> database using the command prompt, it puts me through! :) Only when
> Asterisk tries to connect to the postgresql database does it not work.
> Any idea why this is happening?

Can you do a netstat -ap ?

-- 
Linux Home Automation         Neil Cherry        ncherry at comcast.net
http://home.comcast.net/~ncherry/               (Text only)
http://linuxha.sourceforge.net/                 (SourceForge)
http://hcs.sourceforge.net/                     (HCS II)



More information about the asterisk-users mailing list