Thanks Samuel. I have an idea after reading your comment. Do you
mean the system busy situation is not relationship with error 407, 408
and 481?
For the sipp tool, I have figured out how to use it. However, for the
high load performance evaluation. I don't have idea how to do it and
I can't find any information about it as well. Could you give me a
reference (link) about it?
Say, I have a 50 user accounts in the csv file and it will be loaded
for a build-in scenario with RTP package (uac_pcap.xml). Do I need to
find 50 receving parties for that 50 callers? How can I test it in
the receiving end without having 50 real receving parties?
You are right to figure out whether it is a config file or the network
problem. The config file that I use is listed below. From my limited
knowlegde, I can't find any clue to figure out whether it is a problem
of the configuration file. Could you please take a quick look of the
config file and give me some hint to improve it?
Thanks a lot!
unplug
=========================config file=========================
debug=3
fork=yes
log_stderror=no
listen=210.14.25.5:5060 # INSERT EXTERNAL IP ADDRESS HERE
listen=210.14.25.5:6060 # INSERT EXTERNAL IP ADDRESS HERE
listen=10.200.0.228:5060 # INSERT INTERNAL IP ADDRESS HERE
listen=10.200.0.228:6060 # INSERT INTERNAL IP ADDRESS HERE
port=5060
children=16
dns=no
rev_dns=no
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:openser@localhost/openser"
fifo_mode=0666 #fifo permissions can be changed here
log_facility=LOG_LOCAL0
alias=o06.owtel.com
alias=210.14.25.5
alias=10.200.0.228
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/uri.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/avpops.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/permissions.so"
loadmodule "/usr/local/lib/openser/modules/xlog.so"
loadmodule "/usr/local/lib/openser/modules/acc.so"
loadmodule "/usr/local/lib/openser/modules/uac.so"
loadmodule "/usr/local/lib/openser/modules/group.so"
modparam("auth_db|permissions|uri_db|usrloc|domain|acc|group",
"db_url", "mysql://openser:openser@localhost/openser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket",
"/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-clients")
modparam("usrloc", "db_mode", 2)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_inv_timer", 27)
modparam("tm", "fr_inv_timer_avp", "inv_timeout")
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
modparam("avpops", "avp_url",
"mysql://openser:openser@localhost/openser")
modparam("avpops", "avp_table", "usr_preferences")
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "db_flag", 1)
route {
xlog("L_INFO","---[$fU@MR]-$rm---\n");
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
return;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
return;
};
#------------------------------------------------------------------
# Accounting section
#------------------------------------------------------------------
setflag(1);
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
xlog("L_INFO","---[$fU@MR:117]:behind NAT---\n");
record_route();
add_rr_param(";nat=yes");
} else if (method!="REGISTER") {
record_route();
};
# -----------------------------------------------------------------
# Call Tear Down Section
# do not send to voicemail if BYE or CANCEL
# is used to end call before user pickup or timeout
# -----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
setflag(10);
route(7); #zzz-20060217
end_media_session();
};
if (method=="PRACK") { #zzz-20060217
route(7);
};
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (client_nat_test("3")||search("^Route:.*;nat=yes")){
setflag(6);
use_media_proxy();
};
};
route(1);
return;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (!is_uri_host_local()) {
if (is_from_local() || allow_trusted()) {
route(4);
route(1);
} else {
sl_send_reply("403", "Forbidden");
};
return;
};
if (method=="CANCEL") {
if (!t_check_trans()) {
xlog("L_INFO","[$fU@MR:171]:CANCEL without matching transaction ...
ignore and discard.\n");
return;
}
route(1);
return;
} else if (method=="INVITE") {
route(3);
return;
} else if (method=="REGISTER") {
route(2);
return;
} else if (method=="ACK") {
return;
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
return;
};
route(1);
}
route[1] {
xlog("L_INFO","---[$fU@R1]---\n");
# -----------------------------------------------------------------
# Default Message Handler
# -----------------------------------------------------------------
if (method=="INVITE" && !isflagset(10) && isflagset(11))
{
xlog("L_INFO","---[$fU@R1:205]: for
t_on_failure2---\n");
t_on_failure("2");
}
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
# -----------------------------------------------------------------
# REGISTER Message Handler
# -----------------------------------------------------------------
if (!search("^Contact:[ ]*\*") && client_nat_test("7")) {
xlog("L_INFO","---[$fU@R2:228]:behind NAT---\n");
setflag(6);
fix_nated_register();
force_rport();
} else {
xlog("L_INFO","---[$fU@R2:233]:no NAT---\n");
};
sl_send_reply("100", "Trying");
if (!www_authorize("sipdev01.owtel.com","subscriber")) {
xlog("L_INFO","---[$fU@R2:239]:Unauthorized---\n");
www_challenge("sipdev01.owtel.com","0");
return;
};
if (!check_to()) {
xlog("L_INFO","---[$fU@R2:245]:Unauthorized---\n");
sl_send_reply("401", "Unauthorized");
return;
};
#-----------------------------------------------------
# add by ringo zzz
# desc: check if the account is activated
# table: grp
#-----------------------------------------------------
if (!is_user_in("From","active")) {
xlog("L_INFO","---[$fU@R2:252]: 402 Payment Required---\n");
sl_send_reply("402", "Payment Required");
acc_db_request("402 - payment Required", "acc");
return;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
xlog("L_INFO","---[$fU@R3]---\n");
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (avp_db_load("$ruri/username", "s:callfwd")) {
if (avp_check("s:callfwd", "eq/voicemail/i")) {
xlog("L_INFO","---[$fU@R3:434]:$avp(s:callfwd):$ru---\n");
avp_pushto("$ruri", "s:requri");
xlog("L_INFO","---[$fU@R3:436]:$avp(s:callfwd):$ru---\n");
route(4);
route(21);
return;
} else {
xlog("L_INFO","---[$fU@R3:441]: destination
uri: [$ru]---\n");
setflag(22);
avp_pushto("$ruri", "s:callfwd");
xlog("L_INFO","---[$fU@R3:444]: destination
uri: [$ru]---\n");
route(6);
return;
};
return;
};
lookup("aliases");
xlog("L_INFO","---[$fU@R3:452]:RURI:$ru---\n");
if (!lookup("location")) {
route(15);
return;
};
if (avp_db_load("$ruri/username", "s:fwdbusy")) {
if (!avp_check("s:fwdbusy", "eq/$ruri/i")) {
if (avp_check("s:fwdbusy", "eq/voicemail/i")) {
#flag11 is used to mark forward directly to voicemail on busy
xlog("L_INFO","---[$fU@R3:477]: s:fwdbusy to $avp(s:fwdbusy)
(setflag11)---\n");
setflag(11);
} else {
xlog("L_INFO","---[$fU@R3:480]: s:fwdbusy to $avp(s:fwdbusy)
(setflag26)---\n");
setflag(26);
};
};
};
if (avp_db_load("$ruri/username", "s:fwdnoanswer")) {
if (!avp_check("s:fwdnoanswer", "eq/$ruri/i")) {
if (avp_check("s:fwdnoanswer", "eq/voicemail/i")) {
#flag11 is used to mark forward directly to voicemail on no answer
xlog("L_INFO","---[$fU@R3:490]: s:fwdnoanswer to
$avp(s:fwdnoanswer) (setflag11)---\n");
setflag(11);
} else {
xlog("L_INFO","---[$fU@R3:493]: s:fwdnoanswer to
$avp(s:fwdnoanswer) (setflag27)---\n");
setflag(27);
};
};
};
t_on_failure("1");
route(4);
route(1);
}
route[4] {
xlog("L_INFO","---[$fU@R4]---\n");
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
setflag(8);
use_media_proxy();
};
};
}
route[5] {
xlog("L_INFO","---[$fU@R5]:10.200.0.216---\n");
# -----------------------------------------------------------------
# PSTN Handler
# -----------------------------------------------------------------
rewritehost("10.200.0.216"); # INSERT YOUR PSTN GATEWAY IP ADDRESS
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(4);
route(1);
}
route[6] {
xlog("L_INFO","---[$fU@R6]:RURI:$ru---\n");
# ------------------------------------------------------------------------
# Call Forwarding Reply Route Handler
#
# This must be done as a route block because sl_send_reply() cannot be
# called from the failure_route block
# ------------------------------------------------------------------------
lookup("aliases");
if (!isflagset(22)) {
append_branch();
};
if (uri!=myself) {
route(4);
route(1);
return;
};
if (!lookup("location")) {
if (uri=~"^sip:[0-9]*@") {
xlog("L_INFO","---[$fU@R6:600]:RURI:$ru---\n");
#route(16);
return;
};
sl_send_reply("404", "User Not Found");
};
route(4);
route(1);
}
route[7] {
#-----------------------------------------------------------
#This route is for NAT purpose
#-----------------------------------------------------------
xlog("L_INFO","---[$fU@R7]---\n");
if (!search("^Contact:[ ]*\*") && client_nat_test("7")) {
#xlog("L_INFO","---[$fU@R7:373]---\n");
setflag(6);
fix_nated_register();
force_rport();
};
}
route[15] {
xlog("L_INFO","---[$fU@R15]:$ru---\n");
if (is_user_in("From", "record")) {
if (uri=~"^sip:852[0-9]*@") {
xlog("L_INFO","---[$fU@R15:436]:$ru:852-record---\n");
route(4);
route(23);
return;
} else if ((uri=~"^sip:639[0-9]*@") || (uri=~"^sip:632[0-9]*@")) {
xlog("L_INFO","---[$fU@R15:441]:$ru:639/632-record---\n");
route(4);
route(23);
return;
} else if (uri=~"^sip:1[0-9]*@") {
xlog("L_INFO","---[$fU@R15:446]:$ru:1-record---\n");
route(4);
route(23);
return;
} else if
(uri=~"^sip:2000\**@|^sip:2300\**@|^sip:2400\**@|^sip:2000@|^sip:2300@|^sip:2400@")
{
xlog("L_INFO","---[$fU@R15:451]:$ru---\n");
route(4);
route(5);
return;
} else {
route(29);
};
} else {
if (uri=~"^sip:852[0-9]*@") {
xlog("L_INFO","---[$fU@R15:436]:$ru:852-norecord---\n");
prefix("960");
route(4);
route(21);
return;
} else if ((uri=~"^sip:1[0-9]*@") ||
(uri=~"^sip:639[0-9]*@")) {
prefix("960");
xlog("L_INFO","---[$fU@R15:467]:$ru---\n");
route(4);
route(20);
return;
} else if (uri=~"^sip:632[0-9]*@") {
prefix("960");
xlog("L_INFO","---[$fU@R15:473]:$ru---\n");
route(4);
route(22);
return;
} else if
(uri=~"^sip:2000\**@|^sip:2300\**@|^sip:2400\**@|^sip:2000@|^sip:2300@|^sip:2400@")
{
xlog("L_INFO","---[$fU@R15:478]:$ru---\n");
route(4);
route(5);
return;
} else {
route(29);
};
}
}
route[16] {
xlog("L_INFO","---[$fU@R16]:$ru---\n");
#-------------------------------------------------------------
#for call forwarding
#-------------------------------------------------------------
if (uri=~"^sip:8[0-9]{11}@") {
#prevent to dial a unlogin sip number (prevent looping)
xlog("L_INFO","---[$fU@R16:865]:$ru:404 Not
Found---\n");
route(29);
#sl_send_reply("404", "Not Found");
return;
};
#avp_pushto("$ruri", "s:touri");
if (uri=~"sip:001[0-9]*@") {
xlog("L_INFO","---[$fU@R16:868]:$ru:IDD---\n");
route(4);
route(1);
#route(23);
return;
}
if (avp_check("s:locale","eq/US/g")) { #source from US
xlog("L_INFO","---[$fU@R16:874]:$ru:From US---\n");
if
(uri=~"^sip:1213[0-9]*@|^sip:1310[0-9]*@|^sip:1323[0-9]*@|^sip:1562[0-9]*@|^sip:1619[0-9]*@|^sip:1626[0-9]*@|^sip:1650[0-9]*@|^sip:1661[0-9]*@|^sip:1760[0-9]*@|^sip:1805[0-9]*@|^sip:1818[0-9]*@|^sip:1831[0-9]*@|^sip:1858[0-9]*@|^sip:1949[0-9]*@|^sip:1951[0-9]*@")
{
#strip(1);
#prefix("965");
xlog("L_INFO","---[$fU@R16:882]:$ru---\n");
route(4);
route(1);
#route(26);
return;
} else if
(uri=~"^sip:1408[0-9]*@|^sip:1415[0-9]*@|^sip:1510[0-9]*@|^sip:1707[0-9]*@|^sip:1714[0-9]*@|^sip:1925[0-9]*@"
) {
#strip(1);
#prefix("967");
xlog("L_INFO","---[$fU@R16:889]:$ru---\n");
route(4);
route(1);
#route(26);
return;
} else if
(uri=~"^sip:1209[0-9]*@|^sip:1530[0-9]*@|^sip:1559[0-9]*@|^sip:1916[0-9]*@"
) {
#strip(1);
#prefix("969");
xlog("L_INFO","---[$fU@R16:896]:$ru---\n");
route(4);
route(1);
#route(26);
return;
} else {
#prefix("001");
xlog("L_INFO","---[$fU@R16:902]:$ru:Default
USGW---\n");
route(4);
route(1);
#route(23);
return;
};
} else { #source from HK
xlog("L_INFO","---[$fU@R16:908]:$ru:From HK---\n");
#HK to 1624XXXXXXXXXX
if (uri=~"^sip:1624[0-9]*@") {
xlog("L_INFO","---[$fU@R16:911]:$ru:IDD From
HK---\n");
route(4);
route(1);
#route(23);
return;
} else {
#prefix("9");
xlog("L_INFO","---[$fU@R16:917]:$ru:Default
HKGW---\n");
route(4);
route(1);
#route(5);
return;
};
};
}
route[20] {
xlog("L_INFO","---[$fU@R20]:10.30.0.212---\n");
rewritehost("10.30.0.212");
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(4);
route(1);
}
route[21] {
xlog("L_INFO","---[$fU@R21]:10.30.0.215---\n");
rewritehost("10.30.0.215");
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(4);
route(1);
}
route[22] {
xlog("L_INFO","---[$fU@R22]:10.200.0.3---\n");
rewritehost("10.200.0.3"); # INSERT CS GATEWAY IP ADDRESS
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(4);
route(1);
}
route[23] {
xlog("L_INFO","---[$fU@R23]:10.200.0.224---\n");
rewritehost("10.200.0.224"); # INSERT GATEWAY IP ADDRESS
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(4);
route(1);
}
route[29] {
# ----------------------------------------------------------
# -----> drop the call
# ----------------------------------------------------------
xlog("L_INFO","---[$fU@R29:685]:405 Method Not
Allowed---\n");
sl_send_reply("405", "Method Not Allowed");
acc_db_request("405 - Method Not Allowed", "acc");
return;
}
onreply_route[1] {
xlog("L_INFO","---[$fU@ORR1]---\n");
if ((isflagset(6) || isflagset(7)) &&
(status=~"(180)|(183)|2[0-9][0-9]")) {
if (!search("^Content-Length:[ ]*0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
failure_route[1] {
xlog("L_INFO","---[$fU@FR1]---\n");
if (t_check_status("487")) {
return;
};
if (isflagset(26) && t_check_status("486")) {
if (avp_pushto("$ruri", "s:fwdbusy")) {
xlog("L_INFO","---[$fU@FR1:1044]: fwdbusy---\n");
avp_delete("s:fwdbusy");
resetflag(26);
route(6);
return;
};
};
if (isflagset(27) && t_check_status("408")) {
if (avp_pushto("$ruri", "s:fwdnoanswer")) {
xlog("L_INFO","---[$fU@FR1:1054]: fwdnoanswer---\n");
avp_delete("s:fwdnoanswer");
resetflag(27);
route(6);
return;
};
};
end_media_session();
}
failure_route[2] {
xlog("L_INFO","---[$fU@FR2]:for voicemail---\n");
if (!t_was_cancelled()) {
revert_uri();
rewritehostport("10.30.18.230:5060"); #asterisk server ip
append_branch();
xlog("L_INFO","---[$fU@FR2:1071]: Call to
voicemail---\n");
setflag(10);
resetflag(11);
route(1);
}
}
On 5/16/06, samuel <samu60(a)gmail.com> wrote:
2006/5/16, unplug <maillisting(a)gmail.com>om>:
I have experienced an error with using openser
1.0.1 + mediaproxy 1.4.2.
The system works fine in the following loading.
User login to the system: 20 hardware phones
concurrent RTP session: 5
However, when I increase number of user to 50 and concurrent RTP
session to 30. After a few minutes, the system is very unstable. SIP
phones display "wait logon" message as they can't logon to the system
in some reasons and no one can make call even some users can logon.
This situation will remain few minutes and it will resume normal.
After a while, system will become unstable again.
This probably happens because all the listeners are busy (DNS lookup,
mysql queries, exec_*) and the incoming requests are not answered.
That's why your UA shows the can't logon because they get no answer.
This requests are "queued" and they are processed when the load
decreases, and that's why the system "reverts to normality".
Anyone has such experience before? I have
grepped the log using ngrep
but it is very difficult to troubleshoot as it is a log of whole
system with 50 users. In my simple analyst, I found that the most
error replies happened in the log are listed below.
407 - proxy authentication required
This
is returned everytime the route reaches a proxy_challenge
statement. It's used to obtain the user credentials in the digest
algorithm. Usually the first time a UA registers is challenged and the
challenge parameters are valid for a period of time. After this
period, the digest challenge has expired and a new challenge will be
issued.
408 - request timeout
This usually happens
when openSER has relayed a request and does not
receive any response within fr_inv_timeout (this name may have changed
since the time I checked and now).
481 - call leg transaction does not exit
This error is returned by UAs when they receive a request within a
transaction which does not exists| has ended.
As an example:
when the ACK (after the INV-OK) is lost, the UA terminates the invite
transaction. When the other UA sends a BYE, since there is no
transaction, this BYE is answered with a "481 call leg transaction
does not exist".
Do above errors will make the system unstable?
Which one is the most
critical? When and how the above errors will occur?
To repeat the situation above, it involves a lot of resources. Is
there any sip phone simulator which can be used to simulate as a large
number of user to create calls simultaneously?
Take a look at sipp for high load performance evaluation.
I guess there's some bottleneck either in your config file or in your
network that leads to this "network congestion" .
Hope it helps,
Samuel.
Thanks!!
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users