Hi all,
we are testing SER 0.9.6 and SER 2.0 in a Red Hat Enterprise Linux AS release 3 (Taroon Update 8) environment. For test persitence auth mode configuration we have installed a MySQL 5 server with development libraries. The RPM pakages are:
MySQL-shared-compat-5.0.27-0.rhel3
MySQL-server-standard-5.0.27-0.rhel3
MySQL-devel-standard-5.0.27-0.rhel3
MySQL-client-standard-5.0.27-0.rhel3
We have compiled, installed and configurated both SER 0.9.6 and SER 2.0 following the INSTALL instructions. Besides, our environment has all the previous requirements for installing SER. In a no persitence auth mode configuration the SER server works fine, but when we configure a persistence auth mode using mysql module (previous mysql.so generation and installation and ser.cfg configuration) the server crash.
We are compiling and installing without error using this commands (for instance in SER 0.9.6):
make mode=debug include_modules="mysql" all
make include_modules="mysql" install
The error is this (for instance in SER 0.9.6, see line 2 in the log) :
0(17102) loading module /usr/local/lib/ser/modules/mysql.so
0(17102) ERROR: load_module: could not open module </usr/local/lib/ser/modules/mysql.so>: /usr/local/lib/ser/modules/mysql.so: undefined symbol: log
0(17102) parse error (28,13-14): failed to load module
0(17102) loading module /usr/local/lib/ser/modules/sl.so
0(17102) loading module /usr/local/lib/ser/modules/tm.so
0(17102) loading module /usr/local/lib/ser/modules/rr.so
0(17102) loading module /usr/local/lib/ser/modules/maxfwd.so
0(17102) loading module /usr/local/lib/ser/modules/usrloc.so
0(17102) loading module /usr/local/lib/ser/modules/registrar.so
0(17102) loading module /usr/local/lib/ser/modules/textops.so
0(17102) loading module /usr/local/lib/ser/modules/auth.so
0(17102) loading module /usr/local/lib/ser/modules/auth_db.so
0(17102) set_mod_param_regex: usrloc matches module usrloc
0(17102) set_mod_param_regex: found <db_mode> in module usrloc [/usr/local/lib/ser/modules/usrloc.so]
0(17102) set_mod_param_regex: auth_db matches module auth_db
0(17102) set_mod_param_regex: found <calculate_ha1> in module auth_db [/usr/local/lib/ser/modules/auth_db.so]
0(17102) set_mod_param_regex: auth_db matches module auth_db
0(17102) set_mod_param_regex: found <password_column> in module auth_db [/usr/local/lib/ser/modules/auth_db.so]
0(17102) set_mod_param_regex: rr matches module rr
0(17102) set_mod_param_regex: found <enable_full_lr> in module rr [/usr/local/lib/ser/modules/rr.so]
0(17102) find_export: found <mf_process_maxfwd_header> in module maxfwd [/usr/local/lib/ser/modules/maxfwd.so]
0(17102) find_export: found <sl_send_reply> in module sl_module [/usr/local/lib/ser/modules/sl.so]
0(17102) find_export: found <sl_send_reply> in module sl_module [/usr/local/lib/ser/modules/sl.so]
0(17102) find_export: found <record_route> in module rr [/usr/local/lib/ser/modules/rr.so]
0(17102) find_export: found <loose_route> in module rr [/usr/local/lib/ser/modules/rr.so]
0(17102) find_export: found <append_hf> in module textops [/usr/local/lib/ser/modules/textops.so]
0(17102) find_export: found <append_hf> in module textops [/usr/local/lib/ser/modules/textops.so]
0(17102) find_export: found <www_authorize> in module auth_db [/usr/local/lib/ser/modules/auth_db.so]
0(17102) find_export: found <www_challenge> in module auth [/usr/local/lib/ser/modules/auth.so]
0(17102) find_export: found <save> in module registrar [/usr/local/lib/ser/modules/registrar.so]
0(17102) find_export: found <lookup> in module registrar [/usr/local/lib/ser/modules/registrar.so]
0(17102) find_export: found <append_hf> in module textops [/usr/local/lib/ser/modules/textops.so]
0(17102) find_export: found <lookup> in module registrar [/usr/local/lib/ser/modules/registrar.so]
0(17102) find_export: found <sl_send_reply> in module sl_module [/usr/local/lib/ser/modules/sl.so]
0(17102) find_export: found <append_hf> in module textops [/usr/local/lib/ser/modules/textops.so]
0(17102) find_export: found <t_relay> in module tm [/usr/local/lib/ser/modules/tm.so]
0(17102) find_export: found <sl_reply_error> in module sl_module [/usr/local/lib/ser/modules/sl.so]
ERROR: bad config file (1 errors)
.....
The SER configuration file content is:
#
# $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=4 # 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
*/
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 -------------------
# ------------------------- 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==myself) {
# 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==myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("mydomain.org", "subscriber")) {
www_challenge("mydomain.org", "0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
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();
};
}
Searching mysql libraries in the environment we have:
# ldconfig -p | grep -i mysqlclient
libmysqlclient_r.so.15 (libc6) => /usr/lib/libmysqlclient_r.so.15
libmysqlclient_r.so.14 (libc6) => /usr/lib/libmysqlclient_r.so.14
libmysqlclient_r.so.12 (libc6) => /usr/lib/libmysqlclient_r.so.12
libmysqlclient_r.so.10 (libc6) => /usr/lib/libmysqlclient_r.so.10
libmysqlclient_r.so (libc6) => /usr/lib/libmysqlclient_r.so
libmysqlclient.so.15 (libc6) => /usr/lib/libmysqlclient.so.15
libmysqlclient.so.14 (libc6) => /usr/lib/libmysqlclient.so.14
libmysqlclient.so.12 (libc6) => /usr/lib/libmysqlclient.so.12
libmysqlclient.so.10 (libc6) => /usr/lib/libmysqlclient.so.10
libmysqlclient.so (libc6) => /usr/lib/libmysqlclient.so
# ls -ltr /usr/lib/mysql
total 16096
-rw-r--r-- 1 root root 57872 oct 21 2006 libmygcc.a
-rwxr-xr-x 1 root root 789 oct 21 2006 libz.la
-rw-r--r-- 1 root root 165448 oct 21 2006 libz.a
-rw-r--r-- 1 root root 1657008 oct 21 2006 libmystrings.a
-rw-r--r-- 1 root root 922784 oct 21 2006 libmysys.a
-rw-r--r-- 1 root root 27974 oct 21 2006 libdbug.a
-rw-r--r-- 1 root root 587234 oct 21 2006 libmyisammrg.a
-rw-r--r-- 1 root root 1832838 oct 21 2006 libmyisam.a
-rw-r--r-- 1 root root 41910 oct 21 2006 libvio.a
-rw-r--r-- 1 root root 416488 oct 21 2006 libheap.a
-rwxr-xr-x 1 root root 969 oct 21 2006 libmysqlclient_r.la
-rw-r--r-- 1 root root 4978414 oct 21 2006 libmysqlclient_r.a
-rwxr-xr-x 1 root root 923 oct 21 2006 libmysqlclient.la
-rw-r--r-- 1 root root 4956358 oct 21 2006 libmysqlclient.a
-rw-r--r-- 1 root root 738080 oct 21 2006 mysqld.sym
We have tried with SER 2.0 too, but the error is the same.
What are we doing bad???????
Thanks in advance,
Eduardo
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello everybody,
I have a very strange thing:
The time on my openser server and on my SIP clients is around: Thu Sep 27 19:22:07 CEST 2007
But when I look the sip_trace mysql request, it's written: '1516687-12-17 11:16:51'
It seems to be an error of parsing...
Have you got any idea who to fix it?
I have tried to add append_time() and to remove it, but it doesn't change anything...
Thanks,
Marc
T 172.24.0.8:56702 -> 172.24.3.1:3306 [AP]
.....insert into sip_trace (msg,callid,method,status,fromip,toip,date,direction,fromtag,traced_user ) values ('SIP/2.0 180 Ringing\r\nVia: SIP/2.0/UDP
213.91.4.198;branch=z9hG4bK803a.25dd3be.0\r\nVia: SIP/2.0/UDP 62.210.194.120:1029;rport=1027;branch=z9hG4bK1364252036021976086\r\nFrom: \"Polyconseil
TEST\"<sip:6710@sd-6444.dedibox.fr:5060;user=phone>;tag=c0a80101-81fe9a1\r\nTo:
<sip:jbchavanne@sip.wifirst.net;user=phone>;tag=c0a80101-f7fdd17\r\nCall-ID: 75359d5c-c0a80101-0-10(a)192.168.95.68\r\nCSeq: 1 INVITE\r\nAllow:
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,INFO\r\nContact:
<sip:jbchavanne@62.210.194.120:1049;user=phone>\r\nRecord-Route: <sip:213.91.4.198;lr=on;ftag=c0a80101-81fe9a1>\r\nAllow-Events:
refer,dialog,message-summary,check-sync,talk,hold\r\nContent-Length:
0\r\n\r\n','75359d5c-c0a80101-0-10(a)192.168.95.68','','180','62.210.194.120:1037','udp:213.91.4.198:5060','1516687-12-17
11:16:51','in','c0a80101-81fe9a1','')
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG++hVqjpLE0HiOBYRAsL8AKCSrhtug5CSx+thLz4iaqpQJ8iaUQCglrWv
3aiquJBzx+a1V3+AS6Gt4Dk=
=jN+R
-----END PGP SIGNATURE-----
Hi all,
I am trying to make a call between 2 different domains. I have my SRV
and NAPTR records in the zone file. I am getting the following error:
0(11285) get_record: lookup(_sip._udp.test.org, 33) failed
0(11285) sip_resolvehost: no SRV record found for test.org, trying
'normal lookup'
Please tell me the correct format of SRV record.
Kindly help me in this regard.
Thank you,
Geethanjali
Wipro Technologies
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
Hi all,
First of all, good day :)
Wondering if any of you guy experience in RTPProxy, previously all voice
stream I'll simply forward to Asterisk.
Straight to the point, now I've a working SIP server with combination of
OpenSER and Asterisk, (location A)
but I'll need to setup another OpenSER w/ RTPProxy server on different
location, (location B)
the point of this setup is to make when UA connected to location B, all
the signaling are forward/relay to location A,
but RTP stream will be handled by RTPProxy @ location B, which RTP
stream should contain IP address of location B instead of A.
I've tried numerous setup but couldn't get it work.
_Setup #1_
openser.cfg
# after sanity check
rewritehost("location A IP");
sl_send_reply("300", "redirect");
This works but somehow I need to append IP/hostname to the destination
number (eg., 001 became 001(a)sip.myhost.com),
and ethereal trace on UA still showing the IP in RTP stream is location
A not B.
_Setup #2_
openser.cfg
if (!is_method("INVITE")) {
rewritehost("location A IP");
t_relay();
} else { # INVITE
force_rtp_proxy;
}
but this setup doesn't work :( Do I need to configure the rtp proxy? I
couldn't find any configurable file (.conf) for RTPProxy,
according to the manual it shall extract the destination IP/hostname and
automatically relay the RTP stream,
but .. I'm still no luck with it.
Can't really recalled others config, but does anyone come across this
similar setup?
mind to share your experience with me? And, it that really possible to
put location B's IP into RTP stream,
but actually the main back end was on location A (asterisk) ?
Thanks in advance.
Regards,
David Loh
Hi,
I would like to be able to perform some checks inside ser.cfg, globaly
for all user.
I need to have some kind of the global tag or attribute set to point a
specific condition.
How can I achive that in the nice way, the best would be if this
parameter is somehow
configurable thorugh serweb.
Thank You in advance
Bests
-Tomasz
El Thursday 27 September 2007 15:06:18 Klaus Darilion escribió:
> Hi!
>
> Yes, you are correct - you need the branch_route.
Thanks a lot, I can sleep in calm now ;)
> Further, if you use
> setflag() in a branchroute make sure to use newest openser from SVN as
> there was a bug (also in 1.2.2).
Yep, I read your report before. Thanks.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
Hi,
I have openser 1.2.2 and freeradius-mysql 1.1.7 installed in freebsd.
I don't remember whether I have built freeradius into openser.
How can I find out whether openser is already built with freeradius support?
I want to configure freeradius with openser in the system.
Thanks
SW
Hi, I've discovered en error in my conf when there is an user "B" registered
from two devices:
- device-B1 behind NAT with NO-STUN.
- device-B2 with public IP.
If "A" from public IP calls to "B" then the blag(6) (NAT) should be tested
inside a "branch_route", because if not, then it could return TRUE or FALSE
depending on which device (device-B1 or device-B2) appears first
in "location" table.
So, if I use:
-----------------------------------------------------------------
# RTP-proxy Section
route[8] {
if (isbflagset(6)) {
force_rtp_proxy();
}
}
-----------------------------------------------------------------
then RtpProxy will be enabled or not enabled for **ALL** the branchs (just
device-B1 needs RtpProxy). But the pain here is that it's possible to not
enable RtpProxy in a branch who needs it.
So I think the solution (it seems to work i nmy testing) is to handle this
in "branch_route":
-----------------------------------------------------------------
# RTP-proxy Section
route[8] {
t_on_branch("8");
}
branch_route[8] {
if (isbflagset(6)) {
force_rtp_proxy();
}
}
-----------------------------------------------------------------
I would like to confirm this with you, since I've never seen in any conf
a "branch_route" to handle NAT bflag and RtpProxy. Is my conclusion correct?
should I keep in mind other things related to this?
Thanks a lot.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
Hi @all,
I have following problem. I have registered all my phones on OpenSER
with the full number. e.g. 43 11555 1007
When one employee from one site wants to call an employee from the same
site I want them only to dial 1007 not
The whole number. I have following perl script, but when I use the
"canonical" function, it always adds "+" in front of the number.
I get following message:
canonical number in 'sip:1777@server.com' is '+43115551007'
After the execution of the perl script I want to check, if the user with
43115551007:
It looks like this:
if (uri=~"sip:[0-9]+@.*")
{
perl_exec("canonical");
if (does_uri_exist())
{
route(2);
} else {
#route to LCR-Module
route(3);
};
}
But it does not run well.
The script looks like this:
-------------------------------------------------
use OpenSER::Constants;
use OpenSER::Utils::PhoneNumbers;
sub canonical {
my $m = shift;
if ($m->getMethod() eq "INVITE") {
my $p = new
OpenSER::Utils::PhoneNumbers(publicAccessPrefix => "",
internationalPrefix => "",
longDistancePrefix => "",
countryCode =>
"43",
areaCode =>
"11555",
pbxCode => "");
my $u = $m->getRURI();
if ($u =~ m/(.*)sip:([+0-9]+)\@(.*)/) {
my $c = $p->canonicalForm($2);
OpenSER::log(L_INFO, "canonical number in '$u'
is '$c'\n");
} else {
OpenSER::log(L_INFO, "Not a POTS number.\n");
}
}
return 1;
}
Can anyone provide me some help?
Thanks
martin