[OpenSIPS-Users] Configuring OpenSIPS with Postgresql

Jerry Richards jerry.richards at teotech.com
Tue Dec 6 23:59:51 CET 2011


Just to button up this issue, I have it running now.  I figured out to use postgres, the module is called db_postgres, but the DBENGINE is called PGSQL.  Basically, all of the references in the configs need to be literally "postgres", not "pgsql" or "postgresql".

Thanks,
Jerry


From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Jerry Richards
Sent: Tuesday, December 06, 2011 11:42 AM
To: Bogdan-Andrei Iancu; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Configuring OpenSIPS with Postgresql

Thanks, Bogdan.  Which of these should it be?
    modparam("usrloc", "db_url",  "postgres://opensips:opensipsrw@localhost/opensips")
    modparam("usrloc", "db_url",  "postgresql://opensips:opensipsrw@localhost/opensips")
    modparam("usrloc", "db_url",  "pgsql://opensips:opensipsrw@localhost/opensips")
Thanks,
Jerry


From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Tuesday, December 06, 2011 9:34 AM
To: OpenSIPS users mailling list
Cc: Jerry Richards
Subject: Re: [OpenSIPS-Users] Configuring OpenSIPS with Postgresql

Hello Jerry,

If you want to use postgres with opensips, you need to change all the db_url parameters in opensips config file; what db backend to be used, is defined via the prefix of the url:
    modparam("usrloc", "db_url",  "mysql://opensips:opensipsrw@localhost/opensips")
versus:
    modparam("usrloc", "db_url",  "postgres://opensips:opensipsrw@localhost/opensips")

Regards,
Bogdan

On 12/01/2011 09:51 PM, Jerry Richards wrote:
Hello,

My opensips is not starting.   I noticed the /var/log/messages file indicates it needs a database.  I want to use postgresql instead of mysql, so I changed the DBENGINE parameter to PGSQL in the opensipsctlrc and osipsconsolerc.

Now, when I execute "./opensipsdbctl create", I get the following error:
ERROR: could not load the script in /opt/opensips/lib64/opensips/opensipsctl/opensipsdbctl.pgsql for database engine PGSQL
ERROR: database engine not loaded - tried 'PGSQL'

I noticed the opensipsdbctl.pgsql file does not exist at all.  I suspect there is a build step to specify postgresql?

Thanks,
Jerry






_______________________________________________

Users mailing list

Users at lists.opensips.org<mailto:Users at lists.opensips.org>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

OpenSIPS solutions and "know-how"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111206/477cda51/attachment-0001.htm>


More information about the Users mailing list