Hello!
I'm again :-).
If I use the next config in my ser.cfg, then the
authentication works fine, but the presence does not.
if (!www_authorize("domain.hu", "subscriber")) {
forward( csps.domain.hu, 5060);
break;
};
But if I insert the save("location") line in my config file,
then the presence info will be good, but the authentication
will be wrong.
if (!www_authorize("domain.hu", "subscriber")) {
forward( csps.domain.hu, 5060);
save("location");
break;
};
Can I mix these two features?
Thanks,
Jani
-----Original Message-----
From: serusers-bounces(a)lists.iptel.org
[mailto:serusers-bounces@lists.iptel.org] On Behalf Of Barta János
Sent: Friday, January 20, 2006 4:45 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] SER frontend
Hello!
I would like to make a frontend SIP perver.
For this server will be only one task, to provide the
presence information.
The architecture:
SIP client -> SER ->CSPS.
I have a problem with the registration method. I'm using
http digest auth.
If I forward the authentication messages (to the CSPS), then
the SIP client logs in automatically, and in this case I
don't have the possibility to type the username/pwd. What is
wrong?
And I have a second question:
Can I use W$ Messenger 5.1 presence under SER? (The 5.0
works fine, but the 5.1 does not.)
This is my config file:
sip:/etc/ser# cat ./ser.cfg
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $ #
# simple quick-start config script #
# ----------- global configuration parameters
------------------------
debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
log_stderror=yes # (cmd line: -E)
/* Uncomment these lines to enter debugging mode fork=no
log_stderror=yes */ alias=domain.hu alias=100.22.2.180
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
# ------------------ module loading
----------------------------------
# Uncomment this if you want to use SQL database loadmodule
"/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/pa.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"
loadmodule "/usr/lib/ser/modules/exec.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 -- #
#######################
/* 0 -- dont use mysql, 1 -- write_through, 2--write_back */
modparam("usrloc","db_mode",0)
#modparam("usrloc","db_url","mysql://xxxxxxx:xxxx@localhost/ser")
#modparam("usrloc", "use_domain", 1)
#modparam("usrloc", "timer_interval", 10)
#####################
# -- auth params -- #
#####################
#modparam("auth_db","calculate_ha1", yes)
#modparam("auth_db","db_url","mysql://xxxxx:xxxxx@localhost/ser")
#modparam("auth_db","password_column","password")
###################
# -- rr params -- #
###################
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
#########################
# -- presence params -- #
#########################
#modparam("pa", "db_url",
"mysql://xxxxxxxx:xxxxxxxx@localhost/ser")
modparam("pa", "default_expires",50)
modparam("pa", "pa_domain", "domain.hu")
# ------------------------- request routing logic
-------------------
# main routing logic
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
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");
if (!t_relay()) {
sl_reply_error();
};
break;
};
if (uri==myself) {
if (method=="REGISTER") {
# if (!www_authorize("domain.hu", "subscriber")) {
# forward( csps.domain.hu, 5060);
# www_challenge("domain.hu", "0");
# break;
# };
save("location");
break;
};
lookup("aliases");
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
forward( csps.domain.hu, 5060);
break;
};
sl_send_reply("404", "Not Found");
# append_hf("P-hint: usrloc applied\r\n");
}
sip:/etc/ser#
Thanks,
Jani
________________________________________________________________
Harry Potter és a Félvér Herceg! Garantált szállítás a megjelenés napján! (február 10. )
Jegyezze elő most!
http://www.bookline.hu/control/news?newsid=322&affiliate=frehp6kar1482