Hi,
When I try to create openser database (openserdbctl create) on Gentoo, I
have the message:
INFO: creating database openser ...
ERROR 1071 (42000) at line 2: Specified key was too long; max key length is
1000 bytes
ERROR: Creating core tables failed!
I search when i can modify TABLE_TYPE but i not found.
Regards,
Yazid
Dear
I am testing a lot of configs, for ser, openser and
asterisk,
but till now, I can not find a total solution for
solving nat,
do you think ser/openser+ (defined modules) can
support all of nat services, around the world ?
best,
Hi,
I have a problem with openser and rtpproxy. I'm trying to use them as a
gateway between the public internet and a LAN. Clients in the internet
may be natted, so I'm using nathelper. Calls are only made from LAN to
outside or vice versa, but not from LAN to LAN or from outside to
outside. The following should illustrate my configuation:
----- ------------------
UAC1 --- | NAT | ------------- | OpenSER/rtpproxy | ----------------UAC2
----- ------------------ |
| | | |
dynamic public IP 2.3.4.5 192.168.103.121
192.168.103.189
(e.g. 1.2.3.4)
UAC1 and UAC2 are both registered at OpenSER. Now I'm making a call from
UAC1 to UAC2. SIP messages are passed just fine, but the RTP traffic
from UAC2 to UAC1 is dropped at the NAT. I used tcpdump on the
OpenSER/rtpproxy machine to figure out what happens to RTP and it shows
the following (ports and IPs are just examples):
stream1: 1.2.3.4:10000 -> 2.3.4.5:35000 ->RTP is forwarded by
rtpproxy-> 192.168.103.121:35000 -> 192.168.103.189:11000
stream2: 1.2.3.4:20000 <- 2.3.4.5:35000 <-RTP is forwarded by
rtpproxy<- 192.168.103.121:35000 <- 192.168.103.189:11000
Port 20000 in stream2 is the RTP-port used internally by UAC1 behind the
NAT (this port is found in the INVITE from UAC1 to OpenSER). I
understand, that rtpproxy sends the first packets to port 20000. But,
after receiving some packets from port 10000, shouldn't it change the
destination port to 20000 so they can pass the NAT?
rtpproxy is started like this: "./rtpproxy -l 192.168.103.121/2.3.4.5 -f ".
It produces the following output:
[root@192 rtpproxy]# /usr/local/bin/rtpproxy -l
192.168.103.121/2.3.4.5 -f
rtpproxy started, pid 22125
received command "UIE
9D740CB7-18A4-40B2-A96D-13FC3C5B27D3(a)192.168.103.189 192.168.103.189
49156 207860870326595;1"
new session 9D740CB7-18A4-40B2-A96D-13FC3C5B27D3(a)192.168.103.189,
tag 207860870326595;1 requested, type strong
new session on a port 35000 created, tag 207860870326595;1
pre-filling caller's address with 192.168.103.189:49156
sending reply "35000 2.3.4.5
"
received command "L
9D740CB7-18A4-40B2-A96D-13FC3C5B27D3(a)192.168.103.189 1.2.3.4 49154
207860870326595;1 5364140283;1"
lookup on ports 35000/35000, session timer restarted
pre-filling callee's address with 1.2.3.4:49154
sending reply "35000 192.168.103.121
In my openser.cfg I'm not really checking wheter a client is really
natted, but I think it shouldn't be a problem to assume, that all
clients are behind a NAT? I attached the openser.cfg to this mail (real
public IP is changed to 2.3.4.5).
Do you have any ideas how to fix this problem? Any help would be greatly
appreciated!
Thanks,
Christian
# $Id: nat-rtpproxy.cfg 51 2006-01-31 13:28:04Z /CN=Paul Hazlett/emailAddress=paul(a)onsip.org $
#/usr/local/bin/rtpproxy -l 192.168.103.121/2.3.4.5 -f
debug=6
fork=yes
log_stderror=no
log_facility=LOG_LOCAL1
listen=192.168.103.121 # Internal IP
listen=2.3.4.5 # External IP
port=5060
children=4
dns=no
rev_dns=no
#set module path
mpath="/usr/local/lib/openser/modules/"
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "uri.so"
loadmodule "uri_db.so"
loadmodule "nathelper.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
modparam("auth_db|uri_db|usrloc", "db_url", "mysql://xxx:yyy@192.168.103.122/openser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "rtpproxy_sock", "unix:/home/sys/bin/rtpproxy.sock")
modparam("nathelper", "received_avp", "$avp(s:rcv)")
modparam("registrar", "received_avp", "$avp(s:rcv)")
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "nat_bflag", 6)
modparam("rr", "enable_full_lr", 1)
route {
setflag(1); # log this msg
# -----------------------------------------------------------------
# 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;
};
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method!="REGISTER") {
record_route();
};
if (method=="BYE" || method=="CANCEL") {
unforce_rtp_proxy();
}
# -----------------------------------------------------------------
# Loose Route Section
# -----------------------------------------------------------------
if (loose_route()) {
if ((method=="INVITE" || method=="REFER") && !has_totag()) {
sl_send_reply("403", "Forbidden");
return;
};
if (method=="INVITE") {
setflag(6);
force_rport();
fix_nated_contact();
if (dst_ip == 192.168.103.121){
force_rtp_proxy("faie");
}
else
{
force_rtp_proxy("faei");
}
};
route(1);
return;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (uri!=myself) {
route(4);
route(1);
return;
};
if (method=="ACK") {
route(1);
return;
} else if (method=="CANCEL") {
route(1);
return;
} else if (method=="INVITE") {
route(3);
return;
} else if (method=="REGISTER") {
route(2);
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] {
# -----------------------------------------------------------------
# Default Message Handler
# -----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" && isflagset(6)) {
unforce_rtp_proxy();
};
sl_reply_error();
};
}
route[2] {
# -----------------------------------------------------------------
# REGISTER Message Handler
# ----------------------------------------------------------------
setflag(6);
fix_nated_register();
force_rport();
sl_send_reply("100", "Trying");
if (!save("location")) {
log(1,"Error :-(.\n");
sl_reply_error();
};
}
route[3] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
setflag(6);
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
return;
};
route(4);
route(1);
}
route[4] {
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
force_rport();
fix_nated_contact();
if (dst_ip == 192.168.103.121){
log(1,"INVITE 4 intern extern\n");
force_rtp_proxy("fie");
}
else
{
log(1,"INVITE 4 extern intern\n");
force_rtp_proxy("fei");
}
}
onreply_route[1] {
force_rtp_proxy("f");
fix_nated_contact();
}
Hi,
I am hoping someone can help me our with associating user with group in
openser.
If I use the command line:
Question 1:
debian:/home/ser# openserctl acl grant 1006 LD
WARNING: Invalid privilege: acl 'LD' ignored
debian:/home/ser#
What is wrong with the syntax?
Question 2:
If I use sermyadmin to associate user to groups, I get the following error:
org.codehaus.groovy.runtime.InvokerInvocationException:
org.springframework.dao.DataIntegrityViolationException: could not
insert: [UserGroup]; nested exception is
org.hibernate.exception.ConstraintViolationException: could not
insert: [UserGroup]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jsecurity.web.servlet.WebInterceptorFilter.doFilterInternal(WebInterceptorFilter.java:106)
at org.jsecurity.web.servlet.SecurityContextFilter.doFilterInternal(SecurityContextFilter.java:93)
at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.dao.DataIntegrityViolationException:
could not insert: [UserGroup]; nested exception is
org.hibernate.exception.ConstraintViolationException: could not
insert: [UserGroup]
at UserController$_closure6_closure11.doCall(UserController.groovy:111)
at UserController$_closure6.doCall(UserController.groovy:101)
at UserController$_closure6.doCall(UserController.groovy)
... 29 more
Caused by: org.hibernate.exception.ConstraintViolationException: could
not insert: [UserGroup]
at $Proxy3.saveOrUpdate(Unknown Source)
... 32 more
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:
Duplicate entry '1005-192.168.1.104-' for key 2
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1011)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:209)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
... 33 more
What is wrong with my setup of sermyadmin?
Thank you in advance for your help.
Regards,
Mark
Hi,
short question:
Can anybody give me a hint regarding the Linux UDP-Buffer size? Are
there any known good values for this or is the default value (128k) of
Linux sufficient? I've read, regarding other SIP-Systems (namely IBM SIP
Servlets and Communigate pro), the recommendation to increase the
UDP-Buffer-size to 3 or even 4 MByte....
Are there any recommended / known best values for heavy load OpenSER
Installations?
Thanks in advance,
Carsten
Reference:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.…
Hi, when I receive a 480 or 603 from a local user I run "on_failure_route" and
create new branch to forward the INVITE to a media server in which I reply an
early-media "The number you are calling is not available now...".
It works perfectly if the error is 4XX but it doesn't work if it's a 6XX. I
get this error:
---------------------
## onreply_route[ON_REPLY_TO_USER]:
603: Decline
## failure_route[ON_FAILURE_TO_USER]
--- TO_MEDIA_SERVER: Destino user_not_available
May 21 12:25:25 [8502] ERROR:tm:t_forward_nonack: discarding fwd for a
cancelled/6xx transaction
May 21 12:25:25 [8502] ERROR:tm:w_t_relay: t_forward_nonack failed
----------------------
My code is very simple:
----------------------
failure_route[ON_FAILURE_TO_USER] {
if (t_check_status("480|603")) {
$rU = "user_not_available";
route(ROUTE_TO_MEDIA_SERVER);
exit;
}
}
route[ROUTE_TO_MEDIA_SERVER] {
rewritehostport("MEDIA_SERVER_IP:MEDIA_SERVER_PORT");
append_branch();
t_relay();
}
---------------------
It seems that if the reply is a 6XX then OpenSer can't generate a new_branch
in failure_route.
May 21 12:25:25 [8502] ERROR:tm:t_forward_nonack: discarding fwd for a
cancelled/6xx transaction
Why? doesn't it make sense to forward to some destination even if the negative
reply is a 4XX or 6XX?
Thanks a lot for any help.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
Hi mates,
Everytime i do try to make my 2 xlite clients talk (which i correctly added
them into the database), i encountered with the same problm, Openser perfoms
authentication and return call failed 403 forbiden signal.
My setup comprise of the first box with openser 1.3 and mediaproxy the
second box with Mysql and two Xlite clients in two other boxes all are in an
internal network, as far as am concerned my NetAdmin have already opened
ports 5060 and 3306 for me. I need your right direction on this probm.
below is my ngrep snapshot
mzee:/# ngrep -d eth1 -W byline port 5060
interface: eth1 (168.172.200.0/255.255.255.0)
filter: (ip or ip6) and ( port 5060 )
#
U 168.172.200.70:1824 -> 168.172.200.87:5060
INVITE sip:musketeerm@168.172.200.87 <sip%3Amusketeerm(a)168.172.200.87>SIP/2.0.
Via: SIP/2.0/UDP 168.172.200.70:1824
;branch=z9hG4bK-d87543-ef08fb62b30f1a54-1--d87543-.
Max-Forwards: 70.
Contact: <sip:dreamteam@168.172.200.70:1824>.
To: "musk"<sip:musketeerm@168.172.200.87 <sip%3Amusketeerm(a)168.172.200.87>>.
From: "dream"<sip:dreamteam@168.172.200.87 <sip%3Adreamteam(a)168.172.200.87>
>;tag=af4bd714.
Call-ID: OTAyNWJhOTdiZjBlNmUwNDYyZWI0YzdkM2JhZTUxMTU..
CSeq: 1 INVITE.
Session-Expires: 95.
Min-SE: 90.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
INFO.
Content-Type: application/sdp.
Supported: timer.
User-Agent: X-Lite release 1011s stamp 41150.
Content-Length: 426.
.
v=0.
o=- 9 2 IN IP4 168.172.200.70.
s=CounterPath X-Lite 3.0.
c=IN IP4 168.172.200.70.
t=0 0.
m=audio 52166 RTP/AVP 107 119 100 106 0 105 98 8 101.
a=alt:1 1 : uZB2dYm+ NKBRK8Ep 168.172.200.70 52166.
a=fmtp:101 0-15.
a=rtpmap:107 BV32/16000.
a=rtpmap:119 BV32-FEC/16000.
a=rtpmap:100 SPEEX/16000.
a=rtpmap:106 SPEEX-FEC/16000.
a=rtpmap:105 SPEEX-FEC/8000.
a=rtpmap:98 iLBC/8000.
a=rtpmap:101 telephone-event/8000.
a=sendrecv.
#
U 168.172.200.87:5060 -> 168.172.200.70:1824
SIP/2.0 403 Forbidden.
Via: SIP/2.0/UDP 168.172.200.70:1824
;branch=z9hG4bK-d87543-ef08fb62b30f1a54-1--d87543-.
To: "musk"<sip:musketeerm@168.172.200.87 <sip%3Amusketeerm(a)168.172.200.87>
>;tag=9a17bd4180f96d7136f8b30b25c6947e.d7e9.
From: "dream"<sip:dreamteam@168.172.200.87 <sip%3Adreamteam(a)168.172.200.87>
>;tag=af4bd714.
Call-ID: OTAyNWJhOTdiZjBlNmUwNDYyZWI0YzdkM2JhZTUxMTU..
CSeq: 1 INVITE.
Server: OpenSER (1.3.0-notls (i386/linux)).
Content-Length: 0.
.
#
U 168.172.200.70:1824 -> 168.172.200.87:5060
ACK sip:musketeerm@168.172.200.87 <sip%3Amusketeerm(a)168.172.200.87> SIP/2.0.
Via: SIP/2.0/UDP 168.172.200.70:1824
;branch=z9hG4bK-d87543-ef08fb62b30f1a54-1--d87543-.
To: "musk"<sip:musketeerm@168.172.200.87 <sip%3Amusketeerm(a)168.172.200.87>
>;tag=9a17bd4180f96d7136f8b30b25c6947e.d7e9.
From: "dream"<sip:dreamteam@168.172.200.87 <sip%3Adreamteam(a)168.172.200.87>
>;tag=af4bd714.
Call-ID: OTAyNWJhOTdiZjBlNmUwNDYyZWI0YzdkM2JhZTUxMTU..
CSeq: 1 ACK.
Content-Length: 0.
WBR,
LU.
--
Luzango Mfupe
TUUNE MOBILE
Tel:0128440528/0123825710
Tshwane-RSA
Hi,
Is it possible to implement a media proxy using wesip? If so, is there a
reference info available?
Other than wesip, is there any other tool that can be used to extend Openser
possibility through a scripting language?
Thanks,
Mark
Hi friends.
OK. People... I'm almost getting crazy. I don't understand what is happening.
I already looked for an answer, but I didn't find nothing yet. I am recording 8 extra
values in ACC, but the SQL command is using a weird value for one of them. So,
I removed 6 of them to facilitate the analyze. Look at the code:
.
.
modparam("acc", "db_extra", "valueA=$avp(i:15); valueB=$avp(i:16)")
.
.
.
avp_write("i:15","$avp(i:15)");
avp_write("i:16","$avp(i:16)");
if(!t_relay())
{
sl_reply_error();
exit;
};
avp_print();
exit;
OK. Looking at these lines, I would say: "the sql INSERT command will use the value
15 for avp:15 and 16 for avp:16". Now, look at the result of "avp_print":
2(11112) INFO:avpops:print_avp: p=0xb3b4a900, flags=0x0000
2(11112) INFO: id=<16>
2(11112) INFO: val_int=<16>
2(11112) INFO:avpops:print_avp: p=0xb3b4a8e8, flags=0x0000
2(11112) INFO: id=<15>
2(11112) INFO: val_int=<15>
Nice. AVP 15 has the value 15 and the AVP 16 has 16.
But something is happening.... It is the insert command:
insert into acc (from_uri,to_uri,sip_method...............valueA,valueB,time) values
.........,'16','16','2008-05-19 12:48:38').
16 twice!! Why? This question is running in loop inside my head. It should be "....'15','16','2008-05-19 12:48:38'.....".
The openser code above is executed just once by the INVITE.
I can bet this error is the like when we sum "2 and 3" and the result is "6".
You look at the equation, but you don't see it at all. And, when you ask your
younger brother to see, he says: "you are stupid... 2+3=5".
I never had this problem. I use several avps to log in the database and it is the
first time that it happens. You can see that I'M NOT CHANGING the values
of the avps.
Am I doing a stupid thing? Or, maybe, am I being blind?
By the way, I'm using version 1.1.1.
Tks people.
OK. Apparently, there's nothing wrong.
Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/