Hello,
I am trying to set up configuration of two proxies.
The first proxy (IP <...163>) receives all requests, registers users in the data base, and forwards requests to the second proxy (IP <...161.) - see ser.cfg.registrar configuration file. The messages sent to network (I see them via Ethereal). Unfortunately, the second proxy (<161>) does not respond to them. I think I missed some definitions in the second config script (see ser.cfg.proxy below), because direct calls (via <161> or <163>) are processed correctly...
I would appreciate it a lot if someone could help me with this problem.
Thx in advance,
Tina
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Please list let me know if someone is receiving this message, at least
give me a clue where to search for information about this error.
I really need your help.
Regards
-------- Original Message --------
Subject: getting "error: 400; check if you use aliases in SER" when
adding a new user with serctl
Date: Mon, 21 Mar 2005 16:25:55 -0600
From: Alberto Cruz <acruz(a)tekbrain.com>
To: 'serusers(a)lists.iptel.org' <serusers(a)lists.iptel.org>
Hi list maybe this is an stupid question but I can't find any clue what
I'm doing wrong.
When I try to add a new user using serctl add I'm getting the following
error:
error: 400; check if you use aliases in SER
What does "error: 400" mean? I have looked it at messages and I'm no
receiving any log information. I'm using two aliases at my ser.cfg
I'm attaching my ser.cfg
How should I handle this error?
Regards
Alberto Cruz
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
#
#
# ----------- 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
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
listen=65.208.39.215
port=5060
alias=65.208.39.215
alias=sip.telereunion.com.mx
children=4
fifo_mode=0666
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/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/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.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", 2)
modparam("domain", "db_mode", 1)
modparam("auth_db|usrloc|domain|group", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("group", "use_domain", 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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("mediaproxy", "natping_interval", 60)
modparam("registrar", "nat_flag", 2)
# ------------------------- 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")) {
if (method!="ACK") {
sl_send_reply("483","Too Many Hops");
};
break;
};
if (msg:len >= 2048 ) {
if (method!="ACK") {
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
if (!method=="REGISTER") record_route();
if (method=="REGISTER") {
if (uri==myself || 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 {
append_hf("P-hint: outbound alias\r\n");
sl_send_reply("403", "This domain is not served here");
};
break;
};
if (method=="INVITE") {
if (!(is_from_local() || uri==myself || 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();
};
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
# The following lines are added due media proxy
if (method=="INVITE" || method=="ACK") {
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;
};
if (client_nat_test("3") && !search("^Record-Route:")) {
# Mark as NAT'ed
force_rport();
fix_contact();
};
### Begin PSTN evaluation
if (method=="INVITE") {
if (uri=~"sip:01[1-9][0-9]+@.*") {
if (!is_user_in("From", "ld")) {
sl_send_reply("403", "LD permissions needed");
break;
};
rewritehostport("65.208.39.219:5060");
} else if (uri=~"sip:00[1-9][0-9]+@.*") {
if (!is_user_in("From", "int")) {
sl_send_reply("403", "International permissions needed");
break;
};
rewritehost("65.208.39.219");
};
t_on_reply("1");
};
### End PSTN evaluation
if (is_uri_host_local() || uri==myself) { # join with next if?
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "User not found");
break;
};
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
end_media_session();
}
onreply_route[1] {
if (status=~"(180)|(183)|(2[0-9][0-9])") {
if (client_nat_test("1")) {
fix_contact();
};
use_media_proxy();
};
}
hi everybody,
I am using ser with dbtext database
The code is working,
the authentification users is ok
but when i add news users, i have a pb, they are not loaded in the suscriber.
My question is : can i add users in the suscriber table (dbtext)
without restart ser
Thank you.
#
# $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=7 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes
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"
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/dbtext.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
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",2)
modparam("usrloc", "db_url", "/usr/local/etc/ser/dbtext")
# -- auth params --
#
modparam("auth_db", "db_url", "/usr/local/etc/ser/dbtext")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
################################################################
# -- registrar params --
##########################################################
#modparam("registrar", "nat_flag", 6)
#modparam("registrar", "max_expires", 1200)
#modparam("registrar", "min_expires", 300)
#modparam("registrar", "default_expires", 1200)
#modparam("registrar", "use_domain", 1)
#modparam("registrar","desc_time_order",1)
# -- 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==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
# if (!www_authorize("softiphone.net", "subscriber")) {
# www_challenge("softiphone.net", "0");
# break;
# };
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
break;
}
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
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();
};
}
Hello... please, sorry me!!! i don't speak english...
please i need your help! i like download SER(SIP Express Router)! i can not install, if can help me, thank you!!!
---------------------------------
Hi all,
what the best way to catch rpid value from DB in SER release 0.9.0 and 0.9.1? In my test I've setting this 2 modparam line:
modparam("auth_db", "avps_column_int", "domn")
modparam("auth_db", "avps_column_str", "uuid|rpid")
and the function
append_rpid_hf("<", ">;party=calling;id-type=subscriber;screen=yes;privacy=off");
is called before t_relay().
But in the release 0.9.0 SER is unable to catch the rpid value from DB and the call failed when is parsed from my DSS-1 Gateway, wheter in 0.9.1 release all works well.
I've, as usual, provisioned the rpid values with serctl rpid add tool.
What I'm wrong or missing?
Many thanx
Verbal
I used the SER 0.10.99 from CVS code. I have
tested it several days. But I found that it often
crashed due to unknow reason.
I debugged it with the coredump ser produced.
it reports:
Loaded symbols for /lib/libnss_dns.so.2
#0 0x00a83755 in relay_reply (t=0xb60abbd8, p_msg=0xffffffff, branch=0,
msg_status=408, cancel_bitmap=0xbffced88)
at t_reply.c:996
996 DBG("DEBUG: relay_reply: branch=%d, save=%d, relay=%d,
msg=%s\n",
(gdb) where
#0 0x00a83755 in relay_reply (t=0xb60abbd8, p_msg=0xffffffff, branch=0,
msg_status=408, cancel_bitmap=0xbffced88)
at t_reply.c:996
#1 0x00a771d8 in timer_routine (ticks=1104, attr=0x0) at timer.c:251
#2 0x080825d9 in timer_ticker () at timer.c:146
#3 0x0805ce12 in main_loop () at main.c:1097
#4 0x0805e5da in main (argc=3, argv=0xbffcef04) at main.c:1569
Fortunately I started the SER with logging functions.
The log says:
8(5775) DEBUG: add_to_tail_of_timer[7]: 0xb60abcf0
18(5775) DEBUG: retransmission_handler : done
18(5775) DEBUG: timer routine:0,tl=0xb60abd00 next=(nil)
18(5775) DEBUG: final_response_handler:stop retr. and send CANCEL
(0xb60abbd8)
18(5775) ->>>>>>>>> T_code=180, new_code=408
27(5784) 0(5757) child process 5775 exited by a signal 11
0(5757) core was generated
0(5757) INFO: terminating due to SIGCHLD
19(5776) INFO: signal 15 received
19(5776) Memory status (pkg):
19(5776) qm_status (0x8108d20):
19(5776) heap size= 1027664
19(5776) used= 28000, used+overhead=55840, free=971824
19(5776) max used (+overhead)= 58848
I have two sip ua, the call must go through the SER.
It will crash about several setup procedure.
I wonder what happens to the SER.
Thanks for your kind help.
Best Regards
Sun Zongjun
I replaced the default domain_suffix with my own and I get this using
lookups, I am using sip_router CVS
get_record: lookup(9.0.9.5.7.7.6.6.6.8.1., 35) failed
8(31957) enum_query(): No NAPTR record found for
9.0.9.5.7.7.6.6.6.8.1..
It looks like it's not seeing the domain I used? suggestions? Is this
broke? Should I manually change the code?
Thanks.
I use the SER 0.10.99 version. I want to modify
the procedure of tm module. Before sending the request
and forwarding the reply, I managed to modify the
request and response, f.e, to insert another header
into the request and response. In the request, it
works correctly.But in the response, sometime it
works, sometimes it failed. The debug log is as
follows.
2(2196) old size: 784, new size: 869
2(2196) build_res_from_sip_res: copied size: orig:76, new: 161, rest:
708 msg=
SIP/2.0 200 OK^M
>P-Security-Nobody:Zgrrv1Y/19zYJGyKXm4obgHZZP5jY59qxbhLxEUgZO11uI41w1QzJKqSbjYQ6G7e/ViClnetse/aCE+dj/TbAZFQa45dL/wPzAS4MDKABos=^M
>/QjFhTWNKQaL8k=^M/*<90>*Via: SIP/2.0/UDP
192.168.0.19:5500;branch=z9hG4bK1648283653^M
Record-Route: <sip:192.168.0.19;ftag=549451184;lr>^M
From: <sip:861111@sip.suntest.com>;tag=81929894;tag=549451184^M
To: <sip:862222@sip.suntest.com>;tag=882426148^M
Call-ID: 903055665(a)192.168.0.19^M
CSeq: 21 INVITE^M
Contact: <sip:862222@192.168.0.19:6600>^M
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, MESSAGE, INFO^M
Content-Type: application/sdp^M
Content-Length: 261^M
^M
v=0^M
o=nobody 20041028 20000001 IN IP4 192.168.0.19^M
s=A call^M
c=IN IP4 192.168.0.19^M
t=1111396796 1111400396^M
m=audio 7100 RTP/AVP 0 8^M
a=rtpmap:0 PCMU/8000^M
a=rtpmap:8 PCMA/8000^M
m=video 7600 RTP/AVP 98 31^M
a=rtpmap:98 H263/90000^M
a=rtpmap:31 vf=4/CIF/1/768^M
I insert the header "P-Security-Nobody: " into the
response using the modified version of function
"append_hf_helper". There are some strange code in
the backend of inserted header. f.e, the italic black
characters in the log. I had added a null terminator
at the tail of the inserted header.
I guess it is caused by the data_lump functions.
Who can tell me the real reason of that?
Thanks for your kind help.
Best Regards.
Sun Zongjun