[Asterisk-Users] Asterisk with PostgreSQL

Caleb Kow calebee at gmail.com
Thu Jun 24 21:10:50 MST 2004


Here we go:

[root at sierra root]# netstat -ap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address        
State       PID/Program name
tcp        0      0 *:32768                 *:*                    
LISTEN      3221/
tcp        0      0 *:imaps                 *:*                    
LISTEN      3359/couriertcpd
tcp        0      0 sierra.onefuse.co:32769 *:*                    
LISTEN      3262/xinetd
tcp        0      0 *:pop3s                 *:*                    
LISTEN      3380/couriertcpd
tcp        0      0 *:mysql                 *:*                    
LISTEN      3326/
tcp        0      0 *:poppassd              *:*                    
LISTEN      3262/xinetd
tcp        0      0 *:pop3                  *:*                    
LISTEN      3369/couriertcpd
tcp        0      0 sierra.onefuse.com:783  *:*                    
LISTEN      3598/spamd -d -c -a
tcp        0      0 *:imap                  *:*                    
LISTEN      3347/couriertcpd
tcp        0      0 *:sunrpc                *:*                    
LISTEN      3202/
tcp        0      0 *:http                  *:*                    
LISTEN      18983/httpd
tcp        0      0 *:smtps                 *:*                    
LISTEN      3262/xinetd
tcp        0      0 203.208.246.139:domain  *:*                    
LISTEN      3273/
tcp        0      0 sierra.onefuse.c:domain *:*                    
LISTEN      3273/
tcp        0      0 *:ftp                   *:*                    
LISTEN      3262/xinetd
tcp        0      0 *:ssh                   *:*                    
LISTEN      3578/sshd
tcp        0      0 sierra.onefuse.com:ipp  *:*                    
LISTEN      32149/cupsd
tcp        0      0 *:postgres              *:*                    
LISTEN      21845/postmaster
tcp        0      0 sierra.onefuse.com:rndc *:*                    
LISTEN      3273/
tcp        0      0 *:smtp                  *:*                    
LISTEN      3262/xinetd
tcp        0      0 *:8443                  *:*                    
LISTEN      26729/httpsd
tcp        0      0 *:https                 *:*                    
LISTEN      18983/httpd
tcp        0     20 203.208.246.139:ssh     cm55.gamma149.max:29030
ESTABLISHED 25000/sshd
tcp        0      0 203.208.246.139:ftp     cm6.gamma81.maxon:45396
ESTABLISHED 24866/
tcp        0      0 203.208.246.139:imap    d-105-57.dsl.clea:10824
ESTABLISHED 24740/imapd
tcp        0      0 203.208.246.139:http    cache51.156ce.max:11750
TIME_WAIT   -
tcp        0      0 203.208.246.139:http    cache51.156ce.max:11621
TIME_WAIT   -
tcp        0      0 203.208.246.139:http    216.75.226.2:1763      
TIME_WAIT   -
tcp        0      0 203.208.246.139:http    cache51.156ce.max:11746
TIME_WAIT   -
tcp        0      0 203.208.246.139:http    cache51.156ce.max:11745
TIME_WAIT   -
udp        0      0 *:32768                 *:*                       
         3221/
udp        0      0 *:32769                 *:*                       
         3273/
udp        0      0 203.208.246.139:domain  *:*                       
         3273/
udp        0      0 sierra.onefuse.c:domain *:*                       
         3273/
udp        0      0 *:853                   *:*                       
         3221/
udp        0      0 *:sunrpc                *:*                       
         3202/
udp        0      0 *:631                   *:*                       
         32149/cupsd
udp        0      0 sierra.onefuse.co:43129 sierra.onefuse.co:43129
ESTABLISHED 21845/postmaster

On Thu, 24 Jun 2004 17:44:45 -0400, Neil Cherry <ncherry at comcast.net> wrote:
> 
> Caleb Kow wrote:
> > Results of netstat -ap
> 
> You seem to be missing the top part of the output which looks like this:
> 
> [root at wolfgang build]# netstat -ap
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address           Foreign Address         State
>     PID/Program name
> tcp        0      0 *:nfs                   *:*                     LISTEN      -
> tcp        0      0 *:time                  *:*                     LISTEN
>   3339/xinetd
>  :
>  : (more of the smae looking lines follow).
> 
> Sorry if that wrapped.
> 
> >
> > Active UNIX domain sockets (servers and established)
> > Proto RefCnt Flags       Type       State         I-Node PID/Program
> > name    Path
> > unix  2      [ ACC ]     STREAM     LISTENING     5881   3623/
> >       /tmp/.iroha_unix/IROHA
> > unix  2      [ ACC ]     STREAM     LISTENING     3971   3326/
> >       /var/lib/mysql/mysql.sock
> > unix  2      [ ACC ]     STREAM     LISTENING     6002   3690/
> >       /tmp/jd_sockV4
> > unix  2      [ ACC ]     STREAM     LISTENING     9522765 24900/httpd
> >        /var/run/fpcgisock
> > unix  2      [ ACC ]     STREAM     LISTENING     5863   3607/gpm
> >       /dev/gpmctl
> > unix  13     [ ]         DGRAM                    2839   3171/syslogd
> >       /dev/log
> > unix  2      [ ACC ]     STREAM     LISTENING     9623759
> > 21382/postmaster    /tmp/.s.PGSQL.5432
> > unix  2      [ ACC ]     STREAM     LISTENING     6060   3767/
> >       /tmp/.font-unix/fs7100
> > unix  3      [ ]         STREAM     CONNECTED     9569452 3326/
> >        /var/lib/mysql/mysql.sock
> > unix  3      [ ]         STREAM     CONNECTED     9569451 24907/
> > unix  3      [ ]         STREAM     CONNECTED     9565499 3326/
> >        /var/lib/mysql/mysql.sock
> > unix  3      [ ]         STREAM     CONNECTED     9565498 24905/
> > unix  3      [ ]         STREAM     CONNECTED     9565496 3326/
> >        /var/lib/mysql/mysql.sock
> > unix  3      [ ]         STREAM     CONNECTED     9565495 24908/
> > unix  2      [ ]         DGRAM                    9471559 9212/splogger
> > unix  2      [ ]         DGRAM                    5907   3634/crond
> > unix  2      [ ]         DGRAM                    5826   3598/spamd -d -c -a
> > unix  2      [ ]         DGRAM                    3642   3382/courierlogger
> > unix  2      [ ]         DGRAM                    3621   3371/courierlogger
> > unix  2      [ ]         DGRAM                    3600   3361/courierlogger
> > unix  2      [ ]         DGRAM                    3581   3350/courierlogger
> > unix  2      [ ]         DGRAM                    3225   3273/
> > unix  2      [ ]         DGRAM                    3018   3262/xinetd
> > unix  2      [ ]         DGRAM                    2915   3221/
> > unix  2      [ ]         DGRAM                    2847   3175/klogd
> >
> > On Thu, 24 Jun 2004 10:11:46 -0400, Neil Cherry <ncherry at comcast.net> wrote:
> >
> >>
> >>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)
> >>
> >>
> >>_______________________________________________
> >>Asterisk-Users mailing list
> >>Asterisk-Users at lists.digium.com
> >>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
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> --
> 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)
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list