Hi,
I'm using ser-0.8.14 & serweb_2004-07-27 and have the following problem.
When I try to access the http://host/.../admin/index.php page, I get the
following error:
Warning: mysql_pconnect(): Access denied for user:
'ser(a)host.private.com' (Using password: YES) in
/usr/local/serweb/phplib/db_mysql.inc on line 73
Database error: pconnect(192.168.1.2, ser, $Password) failed.
MySQL Error: ()
Session halted.
Can anyone offer any advice? Thanks,
GA
Hello all,
I asked the questions but i still don't find an appropiate answer, in
the fuctions.
client_nat_test("3");
it takes an argument
usually, i see a "3" for the arguments.
what does that 3 mean? does it represent a type of NAT? If so, what
others argument can I take?
thanks proson
.
I am trying to setup ser to use a posgresql databse. Everythig is ok until i try to register to SIP server with SjPhone when i get the following errors:
PG[129] connect_db Error while parsing it Register
PG[488] begin_transaction no connection, FATAL -3!
get_ha1(): Error while querying database
Any ideeas ?
This is my ser.cfg
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
# Uncomment these lines to enter debugging mode
#debug=3
fork=no
log_stderror=no
listen=193.***.***.***
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"
alias=test.ro
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/postgres.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"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 0)
# -- 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", "sql://blahblah:blahblah@localhost:5432/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 > max_len ) {
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();
# loose-route processing
if (loose_route()) {
t_relay();
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=~test.ro) {
log (1,"Cerere pt test.ro\n");
if (method=="REGISTER") {
log (1,"Am primit Register\n");
# Uncomment this if you want to use digest authentication
if (!www_authorize("test.ro", "subscriber")) {
www_challenge("test.ro", "0");
break;
};
save("location");
log (1,"User Existent\n");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
log (1,"User Inexistent\n");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
Hi Jiri, David,
Thank you very much for your timely replies. I will check if the ACK
hits t_relay or not in my configuration. I have skimmed through the
transaction matching code in SER but I don't remember if it checks the FROM
field or the FROM tag. I'll verify this when I can.
Minh
_____
De : Wearne, David W. [mailto:DWWearne@west.com]
Envoyé : jeudi 6 janvier 2005 20:56
À : PHAN, Quang-Minh (Docteur Ordinateur); serusers(a)lists.iptel.org
Objet : RE: [Serusers] Problem with ACK on Negative Reply
I ran into exactly the same problem in December. There are several reasons
why SER may not realize the ACK belongs to the transaction. Look carefully
at the via: and from: headers in the INVITE and the ACK. The via: should
have a branch parameter, and it should be the same in both. Some UAs do not
put in the branch parameter. In this case SER should (according to RFC3261)
be looking at the combination of the Request URI, To tag, From tag, Call-ID,
Cseq, and top via header. In my case the problem was that SER compares the
>From field rather than the From tag, and it does so incorrectly. I raised
this issue both here and in the serdev list, (you can find the thread in the
December archives), but the developers said they would not fix this because
it is in support of an obsolete spec (RFC 2543).
I recommend you check those headers to see if your situation actually
matches what I ran into, and if so, raise the issue to the serdev list. If
enough people complain, they might decide to provide better support of
RFC3261, section 17.2.3 (Matching Requests to Server Transactions).
Dave
_____
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of PHAN, Quang-Minh (Docteur Ordinateur)
Sent: Thursday, January 06, 2005 12:10 PM
To: serusers(a)lists.iptel.org
Subject: [Serusers] Problem with ACK on Negative Reply
Hi all,
When I use SER in transaction stateful mode, I have the following
problem:
When A sends an "INVITE B" to SER, SER forwards the INVITE to B
statefully. If B reply with "200 OK", everything goes fine as SER will
delete the transaction from memory when it sees the 200 OK. However, if B
send an "BUSY HERE" back to SER, SER will send an ACK to B right away and
then forwards the "BUSY HERE" to A. A will then send an ACK to SER but SER
won't realize that the ACK belong to the transaction and forward it to B.
SER will then keep sending "BUSY HERE" to A until the transaction is timed
out.
I wonder if there is something to add in the configuration file to make
SER understand that the ACK send from A should terminate the transaction.
Any help will be highly appreciated!
Minh
Hi All,
I've successfully installed media proxy and it's working with ser.0.8.14
just fine. I'm using the ser config that comes with media proxy module.
The thing is I don't want all my RTP streams to pass thru the media proxy
(e.g. Clients using public IP). I've tried the isflagset command but it
doesn't seem to work. I've placed a isflagset(2) in my config below but
all my traffic doesn't pass thru the media proxy.
TIA.
route{
if (!mf_process_maxfwd_header("10")) {
if (method!="ACK") {
sl_send_reply("483", "Too many hops");
};
break;
};
if (msg:len >= max_len) {
if (method!="ACK") {
sl_send_reply("513", "Message too big");
};
break;
};
if (method=="REGISTER") {
if (is_from_local()) {
# Mark as NAT'ed
if (client_nat_test("3")) {
setflag(2);
force_rport();
fix_contact();
};
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
break;
} else if (!check_to()) {
sl_send_reply("403", "Username!=To not allowed");
break;
};
if (!save("location")) {
sl_reply_error();
};
} else {
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || is_uri_host_local())) {
sl_send_reply("403", "Relaying is forbidden");
break;
};
t_on_failure("1");
} else if (method == "BYE" || method == "CANCEL") {
end_media_session();
};
if (loose_route()) {
if (method=="INVITE" || method=="ACK") && (isflagset(2)) {
use_media_proxy();
};
# end media session for BYE and CANCEL is done above
# before entering the loose route. no need to call it here
t_relay();
break;
};
# Force subsequent messages to pass trough this proxy
if (method == "INVITE") {
record_route();
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
if (method=="INVITE") {
t_on_reply("1");
};
if (is_uri_host_local()) {
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") && (isflagset(2)) {
use_media_proxy();
};
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}