<P>
<BR>
hello ser users,<BR>
<BR>
i am trying to insert mysql and authorisation modules in to ser. i want to control the user logins. <BR>
<BR>
after refering to the SER getting started document i have loaded mysql and auth etc.. modules in to the ser.cfg. then i tried creating the database 'ser' with 'subscriber' table and "username , domain , password" as fields. but when i used the command "serctl add 1000 password user1@nowhere" it is giving the following error "SER/FIFO not accessible: 2". then when i started SER , i got the following messages in /var/log<BR>
<BR>
Oct 20 16:57:30 localhost ser: WARNING: fix_socket_list: could not rev. resolve 192.168.1.247<BR>
Oct 20 16:57:30 localhost ser: WARNING: fix_socket_list: could not rev. resolve 192.168.1.247<BR>
Oct 20 16:57:30 localhost ser[7006]: Maxfwd module- initializing<BR>
Oct 20 16:57:30 localhost ser[7007]: WARNING: no fifo_db_url given - fifo DB commands disabled!<BR>
<BR>
i am giving my ser.cfg file:<BR>
<BR>
#debug=3 # debug level (cmd line: -dddddddddd)<BR>
#fork=yes<BR>
#log_stderror=no # (cmd line: -E)<BR>
<BR>
/* Uncomment these lines to enter debugging mode<BR>
fork=no<BR>
log_stderror=yes<BR>
*/<BR>
<BR>
check_via=no # (cmd. line: -v)<BR>
dns=no # (cmd. line: -r)<BR>
rev_dns=no # (cmd. line: -R)<BR>
#port=5060<BR>
#children=4<BR>
fifo="/tmp/ser_fifo"<BR>
fifo_db_url="mysql://ser:heslo@192.168.1.247/ser"<BR>
# ------------------ module loading ----------------------------------<BR>
<BR>
# Uncomment this if you want to use SQL database<BR>
loadmodule "/usr/local/lib/ser/modules/mysql.so"<BR>
<BR>
loadmodule "/usr/local/lib/ser/modules/sl.so"<BR>
loadmodule "/usr/local/lib/ser/modules/tm.so"<BR>
loadmodule "/usr/local/lib/ser/modules/rr.so"<BR>
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"<BR>
loadmodule "/usr/local/lib/ser/modules/usrloc.so"<BR>
loadmodule "/usr/local/lib/ser/modules/registrar.so"<BR>
loadmodule "/usr/local/lib/ser/modules/textops.so"<BR>
# Uncomment this if you want digest authentication<BR>
# mysql.so must be loaded !<BR>
loadmodule "/usr/local/lib/ser/modules/auth.so"<BR>
loadmodule "/usr/local/lib/ser/modules/auth_db.so"<BR>
loadmodule "/usr/local/lib/ser/modules/uri_db.so"<BR>
# ----------------- setting module-specific parameters ---------------<BR>
<BR>
# -- usrloc params --<BR>
<BR>
#modparam("usrloc", "db_mode", 0)<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>
modparam("auth_db|uri_db|usrloc", "db_url", "mysql://ser:heslo@192.168.1.247/ser")<BR>
# -- auth params --<BR>
# Uncomment if you are using auth module<BR>
#<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("usrloc", "db_mode", 2)<BR>
# -- rr params --<BR>
# add value to ;lr param to make some broken UAs happy<BR>
modparam("rr", "enable_full_lr", 1)<BR>
<BR>
#modparam("pa","default_expires",1800)<BR>
#modparam("pa","timer_interval",10)<BR>
#modparam("pa","use_db",0)<BR>
#modparam("pa","use_place_table",0)<BR>
#modparam("pa","use_bsearch",0)<BR>
#modparam("pa","use_location_package",0)<BR>
#modparam("pa","pa_domain","bigU.edu")<BR>
# ------------------------- request routing logic -------------------<BR>
<BR>
# main routing logic<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>
#rupesh code start<BR>
if (method=="INVITE")<BR>
{<BR>
route(2);<BR>
break;<BR>
}<BR>
else if (method=="REGISTER") {<BR>
<BR>
# Uncomment this if you want to use digest authentication<BR>
sl_send_reply("100", "Trying");<BR>
<BR>
if (!www_authorize("192.168.1.247", "subscriber")) {<BR>
www_challenge("192.168.1.247", "0");<BR>
break;<BR>
};<BR>
if (!check_to())<BR>
{<BR>
sl_send_reply("401", "Unauthorized");<BR>
break;<BR>
};<BR>
consume_credentials();<BR>
<BR>
if(!save("location"))<BR>
{<BR>
sl_reply_error();<BR>
};<BR>
break;<BR>
};<BR>
lookup("aliases");<BR>
if (!uri==myself) {<BR>
append_hf("P-hint: outbound alias\r\n");<BR>
route(1);<BR>
break;<BR>
};<BR>
<BR>
# native SIP destinations are handled using our USRLOC DB<BR>
if (!lookup("location")) {<BR>
sl_send_reply("404", "Not Found");<BR>
break;<BR>
};<BR>
};<BR>
append_hf("P-hint: usrloc applied\r\n");<BR>
route(1);<BR>
}<BR>
<BR>
route[1]<BR>
{<BR>
# send it out now; use stateful forwarding as it works reliably<BR>
# even for UDP2TCP<BR>
if (!t_relay()) {<BR>
sl_reply_error();<BR>
};<BR>
}<BR>
<BR>
route[2]<BR>
{<BR>
if(!proxy_authorize("192.168.1.247","subscriber"))<BR>
{<BR>
proxy_challenge("192.168.1.247","0");<BR>
break;<BR>
}<BR>
else if(!check_from())<BR>
{<BR>
sl_send_reply("403", "Use From=ID");<BR>
break;<BR>
};<BR>
consume_credentials():<BR>
lookup("aliases");<BR>
if(uri!=myself)<BR>
route(1);<BR>
break;<BR>
};<BR>
<BR>
if(!lookup("location"))<BR>
{<BR>
sl_send_reply("404", "User Not Found");<BR>
break;<BR>
};<BR>
<BR>
route(1);<BR>
}<BR>
<BR>
<BR>
<BR>
hope some one can give me some guidance regarding the same, thank you,<BR>
<BR>
Rupesh
</P>
<br><br>
<a href="http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3"><IMG SRC="http://adworks.rediff.com/cgi-bin/AdWorks/sigimpress.cgi/www.rediff.com/signature-home.htm/1963059423@Middle5?OAS_query=null&PARTNER=3" BORDER=0 VSPACE=0 HSPACE=0></a>