Hi,
I use lookup("aliases") in my ser.cfg file. I read the Admin Guide about
'User Aliases' but I can't make it work.
I use lookup("aliases") just after (method=="REGISTER") as demonstrate
in
the Guide. I use serctl alias add 1234 sip:gwenael@arwen-tech.fr for a new
alias.
I have modparam("usrloc", "db_mode", 0), so I add the alias each time
I
reboot ser.
(I can't use modparam("usrloc", "db_mode", 1)... see my previous
post :-(
Anyone has an idea about my lookup("aliases") problem ?
Thanks
Gwen
# ----------- global configuration parameters ------------------------
debug=1
fork=yes
log_stderror=yes
memlog=0
sip_warning=yes
listen=10.0.1.139
listen=127.0.0.1
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
fifo="/tmp/ser_fifo"
port=5060
children=4
alias="arwen-tech.fr"
alias="10.0.1.139"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
#modparam("usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
# -- rr params --
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
record_route();
if (loose_route()) {
t_relay();
break;
};
if (uri == myself) {
if (method=="REGISTER") {
save("location");
sl_send_reply("200","REGISTER OK");
break;
};
if (!lookup("aliases")) {
log(1, "ALIASES FAILED\n");
};
if (lookup("location")) {
log(1, "USER FOUND\n");
if (!t_relay()) {
sl_reply_error();
};
} else {
log(1, "USER NOT FOUND\n");
sl_send_reply("404", "User not found");
break;
};
} else {
log(1, "OUT REALM\n");
t_relay();
break;
};
}