13 mar 2013 kl. 17:13 skrev Hoai-Anh Ngo-Vi <hngovi.hanv(a)googlemail.com>om>:
Dears,
I have tried out Kamailio 3.3.4 with PostgreSQL as persistence but it does not work.
make FLAVOUR=kamailio include_modules="db_postgres" cfg
was OK. I found /usr/local/lib/kamailio/modules/db_postgres.so after installation.
I have successfully set up database openser using /usr/local/sbin/kamdbctl create with
DBENGINE=PGSQL in /usr/local/etc/kamailio/kamctlrc.
I have edited /usr/local/etc/kamailio/kamailio.cfg with:
#!define WITH_PGSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
...
#!ifdef WITH_PGSQL
#!define DBURL "postgres://openser/openserrw@localhost:5432/openser"
#!endif
...
#!ifdef WITH_PGSQL
loadmodule "db_postgres.so"
#!endif
Run /etc/init.d/kamailio start|debug I got
Listening on
....
kamailio error, failed to start.
Does someone know some hints or have a working example?
When I comment out the first 3 define kamailio starts fine.
Here's a few things you can do
- Check the log files. Kamailio logs to syslog, so it can be /var/log/messages or
/var/log/syslog or something else.
- Run kamailio with "-c" to check your configuration files before you start. Now
some database problems are not
syntax errors, but connections issues (authorization). Those will only be seen when you
actually start kamailio.
- Check the debug option in kamailio to raise the level. It helps with database issues
- Turn on logging to stderr in the core configuration file to get logging to your console
for debugging.
Good luck hunting!
/O