Hello,
I have a question about the behaviour of OpenSER while treating incoming
messages. This question may be a detail for most of the people here, but I
think that it has an impact on the dimensioning of an OpenSER setup,
especially if it is used to treat a large number of users / messages.
I would like to know if Openser is able to store incoming messages in a
queue when all the children launched by the program are occupied, or if the
messages are rejected when no threads are available to treat them.
For instance, if I launch openser with children=5 and these 5 children
threads are occupied when a SIP message arrives, is the message rejected or
is it stored in a FIFO queue ?
In addition, I would be interested to know which part of the code is
relevant to look at to deal with this issue.
Thanks in advance for all your remarks and answers about my question.
Antoine Fressancourt
Hello all !
First of all, thank you very much for this great software it is really
awesome.
For the moment, I am doing static routing with config file rotation in order
to have a kind of dynamic routing to voip gateways, but I would like to store
my routing conditions (src_ip, forward ...) in a MySQL database, is that
currently possible ?
I also have another need. Is openser capable of knowing the capacity of a
remote gateway it fowards the traffic to ? For instance, I have a machine
sending 100+ calls, and I have several voip gateways with 32 channels, then I
would like to "fill" them according to my openser incoming calls. I am not
sure I am clear, but I can re-explain that if needed.
Finally, is there a management tool that can show at any time the amount of
calls being reached trough openser ?
Thank you very much in advance for your answers and keep on the good work !
--
Cordialement, Florian Fainelli
---------------------------------------------
5, rue Charles Fourier
Chambre 1511
91011 Evry
http://www.alphacore.net
(+33) 01 60 76 64 86
(+33) 06 09 02 64 95
---------------------------------------------
Institut National des Télécomnications
http://www.int-evry.fr/telecomint
---------------------------------------------
I have three sip proxies configured with OpenSER and MediaProxy for NAT
traversal support, I'm going to call them Proxy A, B and C. These
proxies work together as a farm; the Proxies A and C points to the MySql
database installed in Proxy B. Proxy B serves as location server an also
as proxy. Everything works fine, the REGISTER requests are validated
against the database (installed in Proxy B) by any proxy without any
problem. Also, the location records are inserted without any problem.
However, I noticed when Proxies A or C receive an INVITE request, they
respond 404 - User Not Found. I made a lot of debug, captures and
anything else, and I found the lookup function is only getting locations
for user agents registered by the Proxy that is making the query; in
other words, if the user X registers through Proxy A, then an INVITE
request received by Proxy A to user X is routed successfully.
I don't know if I'm missing something. I'm using db_mode 1 for usrloc to
store locations directly in the database. Below is one of my
configuration scripts, the three are practically the same, they are
different on the listen IP addresses and in the record route for nated
clients.
I'll appreciate any help. Thank you
# ----------- global configuration parameters ------------------------
debug=9 # 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=AAA.BBB.CCC.DDD
port=5060
children=4
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:password@dbs.sip.mydomain.com/openser"
#Aliases
alias="sip.mydomain.com"
# ------------------ module loading ----------------------------------
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/alias_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/domain.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/xlog.so"
# ----------------- setting module-specific parameters ---------------
modparam("usrloc|auth_db|domain|uri_db|alias_db", "db_url",
"mysql://openser:password@dbs.sip.mydomain.com/openser")
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "timer_interval", 60)
modparam("registrar", "use_domain", 0)
modparam("registrar", "nat_flag", 6)
modparam("registrar", "min_expires", 10)
modparam("registrar", "max_expires", 80)
modparam("registrar", "default_expires", 30)
modparam("rr", "enable_full_lr", 1)
modparam("auth_db", "calculate_ha1", yes)
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/proxydispatcher.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-clie
nts")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-clie
nts")
# ------------------------- request routing logic ------------------- #
main routing logic route {
#
-----------------------------------------------------------------
# Sanity Check Section
#
-----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
exit;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
exit;
};
#
-----------------------------------------------------------------
# Record Route Section
#
-----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
record_route_preset("AAA.BBB.CCC.DDD:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
#
-----------------------------------------------------------------
# Call Tear Down Section
#
-----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
#
-----------------------------------------------------------------
# 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);
exit;
};
#
-----------------------------------------------------------------
# Call Type Processing Section
#
-----------------------------------------------------------------
if (uri!=myself) {
route(4);
route(1);
exit;
};
if (method=="CANCEL") {
route(1);
exit;
} else if (method=="INVITE") {
route(3);
exit;
} else if (method=="REGISTER") {
route(2);
exit;
} else if (method=="ACK") {
exit;
};
if (uri!=myself) {
route(4);
route(1);
exit;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
exit;
};
route(1);
}
route[1] {
#
-----------------------------------------------------------------
# Default Message Handler
#
-----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
#
-----------------------------------------------------------------
# REGISTER Message Handler
# ----------------------------------------------------------------
xlog("L_INFO", "REGISTER - entering section\n");
if (client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
xlog("L_INFO", "REGISTER - nated client detected and fixed
($tu)\n");
};
if (registered("location")) {
xlog("L_INFO", "REGISTER - user already registered
($tu)\n");
};
if (!www_authorize("sip.mydomain.com","subscriber")) {
www_challenge("sip.mydomain.com","0");
exit;
};
if (!check_to()) {
xlog("L_WARN", "REGISTER - unauthorized client ($tu)\n");
sl_send_reply("401", "Unauthorized");
exit;
};
consume_credentials();
xlog("L_INFO", "REGISTER - client authorized ($tu)\n");
if (!save("location")) {
xlog("L_WARN", "REGISTER - client location could not be
saved ($tu)\n");
sl_reply_error();
};
xlog("L_INFO", "REGISTER - client location saved ($tu)\n"); }
route[3] {
#
-----------------------------------------------------------------
# INVITE Message Handler
#
-----------------------------------------------------------------
xlog("L_INFO", "INVITE - entering section\n");
#if (client_nat_test("3")) {
if (client_nat_test("7")) {
setflag(7);
fix_nated_contact();
force_rport();
};
if (!proxy_authorize("sip.mydomain.com","subscriber")) {
proxy_challenge("sip.mydomain.com","0");
exit;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
exit;
};
consume_credentials();
xlog("L_INFO", "INVITE - proxy authorized\n");
if (uri!=myself) {
xlog("L_INFO", "INVITE - <$ru> uri is not from here, routing
out\n");
route(4);
route(1);
exit;
};
xlog("L_INFO", "INVITE - before aliases lookup <$ru>\n");
alias_db_lookup("dbaliases");
xlog("L_INFO", "INVITE - after aliases lookup <$ru>\n");
if (registered("location")) {
xlog("L_INFO", "INVITE - the user is already registered
<$ru>\n");
};
if (!lookup("location")) {
xlog("L_WARN", "INVITE - not located <$ru>\n");
sl_send_reply("404", "User Not Found");
exit;
};
route(4);
route(1);
}
route[4] {
#
-----------------------------------------------------------------
# NAT Traversal Section
#
-----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
xlog("L_INFO", "NAT Traversal - using media proxy\n");
use_media_proxy();
};
}
onreply_route[1] {
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();
};
}
Hi all!
I finally got two clients (minisip and Snom softphone) to work with
openser via TLS. I was using port 5060 for TLS connections, which is
non-standard. I wanted to change this behavious and make openser listen
for TLS connections on port 5061, which I thought should be possible
with the following configuration parameter:
listen = tls:10.1.2.9:5061
After configuring the client (minisip) to use port 5061 for TLS,
restarting openser and re-registering the client, I get the following
error messages in the openser log:
Feb 23 16:48:45 server /usr/local/sbin/openser[6011]: ERROR:tm:add_uac:
can't fwd to af 2, proto 1 (no corresponding listening socket)
Feb 23 16:48:45 server /usr/local/sbin/openser[6011]:
ERROR:tm:t_forward_nonack: failure to add branches
The ssl handshake worked without problems, which I confirmed by looking
at the output of ssldump.
Can anyone tell me what these error messages mean?
I am using openser-1.0.0-tls.
Cheers,
Martin
Hi Folks,
Can anybody help me how to add DNS SRV records for mediaproxy and proxy
dispatcher load balancing concept.
I appreciate your help.
--
Ramu Yadav
Hello!
I would like to make a SIP proxy, with dual function.
The first function will be a normal SIP proxy, while in the
sec. function it will be working as an RTP proxy.
For example:
A user sends a registration reguest to my SIP. The proxy
sees, that the domain name is mytest.ser, and the proxy will
know, that this domain will be managed by itself.
If the user creates a new registration -but in this case
with mytest.hu- then the SER will do a NAT, and forwarding
the message away, via the external interface (to another
proxy).
The arch:
Client <-> DefaultGW (+SIP and RTP proxy) <-> Another SIP
10.1.1.1 <-> 10.1.1.254 __NAT___10.200.200.254 <-> 10.200.200.1
The default config -with a little modification- is working
fine, but it does not rewrite the contact header in the SDP
file .
(I installed the rtpproxy, and I have set up iptables too.)
alias=mytest.ser
loadmodule "/usr/lib/ser/modules/nathelper.so"
route{
#inserted by klaus
if (method=="INVITE") {
record_route();
force_rtp_proxy();
forward(10.200.200.1,5060);
/* set up reply processing */
t_on_reply("1");
};
forward(10.200.200.1,5060);
}
#inserted by klaus
# all incoming replies for t_onrepli-ed transactions enter
here
onreply_route[1] {
if (status=~"[12][0-9][0-9]")
force_rtp_proxy();
}
A number of persons will be use it with M$ Messenger, so I'm
interested in such a solution, where we do not need to set
an outbound proxy in the client.
Can somebody send me any example?
Thanks, Jani
___________________________________________________________________________
[origo] klikkbank lakossági számlacsomag havi 199 Ft-ért, bankkártya éves díj nélkül!
www.klikkbank.hu
Hi List,
I have the following setup now:
<wholesale customer> -> SER -> Asterisk -> PSTN Gateway
I use SER to handle all the SIP mambo-jumbo for my wholesale customers
and my softphones.
I use Asterisk to collect CDRs and to LCR routing.
Now here is to my question:
For my wholesale customers, I do IP-based "trusted host" authentication.
Is there a way to set a SIP field (in SER) which will identify them
uniquely in Asterisk's Master.csv file?
The Asterisk records can look like this:
"","anonymous","0262914900","world","""Anonymous""<anonymous>","SIP/anonymous.invalid-08160370","SIP/mygateway-7073","Dial","SIP/16170262914900@mygateway","2006-02-24
13:03:51","2006-02-24 13:04:08","2006-02-24
13:04:22",31,14,"ANSWERED","DOCUMENTATION"
Any ideas?
Cheers,
Jean-Michel.
--
Jean-Michel Hiver - http://ykoz.net/
Découvrez la Réunion des Technologies IP & Telecom
TEL: +262 (0)262 55 03 98 - RCS 434 273 330 SAINT PIERRE
Hi all,
who know any windows program that support multi video conferencing with
ser, Windows Messanger work well with ser but not sopport this feature.
Any idea?
Tnx
--
+----------------------------------------------------------------------+
| Venuti Piergiorgio Email: piergiorgio(a)mediaservice.net |
| System Manager Tel: +39-011-32.72.100 |
| @ Mediaservice.net S.R.L. Fax: +39-011-32.46.497 |
| Via S.Bernardino 17 Torino |
| Disclaimer: http://@Mediaservice.net/disclaimer |
+----------------------------------------------------------------------+
i am running fedora core and trying to install the latest version of ser i
amm useing xampp till i can get it working properly and finish writig the
guid eim writting then i will install everything properly but the errors im
getting arnt releted to me have xampp on my box.
i used dan austins how to to set up i got as far as the config file edits
beofe it went bad. wehn i tryed to start it i got
ERROR: bad config file (12 errors)
so i ran the debug for it (-c)
and here is what i got
0(14242) ERROR: load_module: could not open module
</usr/local/lib/ser/modules/mysql.so>: libmysqlclient.so.12: cannot open
shared object file: No such file or directory
0(14242) parse error (28,13-14): failed to load module
0(14242) parse error (113,11-15): syntax error
0(14242) parse error (113,11-15): bad command
0(14242) parse error (113,16-18): bad command
0(14242) parse error (113,23-27): bad command
0(14242) parse error (113,28-30): bad command
0(14242) parse error (113,31-34): bad command
0(14242) parse error (113,35-41): bad command
0(14242) parse error (113,42-56): bad command
0(14242) parse error (114,4-6): bad command
0(14242) parse error (121,4-5): syntax error
0(14242) parse error (121,4-5):
ERROR: bad config file (12 errors)
and here is my config file
#
# $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=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)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
# ------------------ 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/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.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)
# -- 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)
# ------------------------- 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
if (!method=="REGISTER") 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");
route(1);
break;
};
if (!uri==perfecthosting.biz) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
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==perfecthosting.biz) {
if (method=="REGISTER") {
Uncomment this if you want to use digest authentication
if (!www_authorize("perfecthosting.biz",
"subscriber")) {
www_challenge("perfecthosting.biz", "0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==perfecthosting.biz) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
i removed the dots from the modula locations because they were causeing
errors it used to sat 40 something errors.
im lost as far as syntax or the mysql so if you have any insight about this
it would be good if you could share
thanks, Alex Wood