Upgrade 3CX to v18 and get it hosted free!

SER module postgres

Author image

You may have to recompile (open)SER to get the postgres.so module.

make include_modules=”postgres”

A minimal postgresql setup:

$ createdb ser
$ psql -U postgres ser
ser=# CREATE TABLE subscriber (
username varchar(32),
domain varchar(32),
password varchar(16),
PRIMARY KEY (username, domain)
);
ser=# create user ser with password ‘mypass’;
ser=# grant all on table subscriber to ser;

and to add users manually

ser=# insert into subscriber values (‘user’, ‘domain_or_realm’, ‘pass’);

make sure these are in ser.cfg

loadmodule “/usr/lib/ser/modules/postgres.so”
loadmodule “/usr/lib/ser/modules/usrloc.so”
loadmodule “/usr/lib/ser/modules/auth.so”
loadmodule “/usr/lib/ser/modules/auth_db.so”
modparam(“usrloc”, “db_mode”, 0) # not using postgresql for usrloc database, in memory only
modparam(“auth_db”, “calculate_ha1”, 1)
modparam(“auth_db”, “password_column”, “password”)
modparam(“auth_db”,”db_url”, “sql://ser:mypass@localhost:5432/ser”)

Please note that later versions (=> 0.9.x) of SER require a change to the db_url:

modparam(“auth_db”,”db_url”, “postgres://ser:mypass@localhost:5432/ser”)

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.