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