Hi
I am new to ser issues. I installed it last Friday. I managed to set up it
correctly with Asterisk, but now I have a slightly problem with
authorization, frankly with postgres.
part of my ser.cfg file looks like this:
# Uncomment this if you want to use SQL database
#loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/postgres.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
modparam("usrloc", "user_column", "username")
modparam("usrloc","db_url",
"postgres://ser:ser1234@localhost:5432/ser")
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
modparam("auth_db","db_url",
"postgres://ser:ser1234@localhost:5432/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("ser.leon.pl",
"subscriber")) {
www_challenge("ser.leon.pl", "0");
break;
};
save("location");
break;
};
}
***
my postgres table subscriber look like this:
username | domain | password
------------ + ------------- + ----------
2222 |
ser.xxx.org | serxxx
this is my only postgres table connected with ser.
I did my configuration according to
http://www.voip-info.org/wiki-SER+module+postgres.
When I restarting ser I getting this error in syslog and my phones are not
able to register to ser:
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: Maxfwd module- initializing
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: PG[364] submit_query query
'select table_version from version where table_name='subscriber'', result
'ERROR: relation "version" does not exist '
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: db_query(): Error while
submitting query
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: table_version(): Error in
db_query
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: auth_db:str_fixup(): Error
while querying table version
Feb 18 16:31:39 asterix /usr/sbin/ser[6164]: ERROR: fix_expr : fix_actions
error
Does anyone can help me with this because I stuck and I can't go any further
with my configuration.
Please help
Andrew
Cheers