[SR-Users] Kamailio with PostgreSQL as persistence

Hoai-Anh Ngo-Vi hngovi.hanv at googlemail.com
Wed Mar 13 17:50:06 CET 2013


Thank you for the advises. I got Kamailio now run with PostgreSQL.

For those might interrested in the cause of the problem. It was a 
permission problem in a single table. With a tail -f on postgres log I 
was able to figure out quickly which table.

Am 13.03.13 17:20, schrieb Olle E. Johansson:
> 13 mar 2013 kl. 17:13 skrev Hoai-Anh Ngo-Vi <hngovi.hanv at googlemail.com>:
>
>> 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
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


-- 
Ngô Vi Hoài Anh
Biedenkopfer Weg 13
60489 Frankfurt am Main

069 74 22 36 63
0172 53 97 0 82




More information about the sr-users mailing list