Hi,
I have an Ubuntu 6.06 install with PostgreSQL 8.1 and OpenSER 1.2.2
which I am testing at the moment.
I have tested OpenSER with MySQL and it worked fine but when when I want
to switch to PostgreSQL I'm having some difficulty.
I have used the postgressqldb.sh script to initialise the database and
it has completed without error.
When I start OpenSER I get the following lines in my PostgreSQL logs:
LOG: connection received: host=127.0.0.1 port=37610
LOG: connection authorized: user=openser database=openser
LOG: SSL SYSCALL error: EOF detected
LOG: could not receive data from client: Connection reset by peer
LOG: unexpected EOF on client connection
I have looked at OpenSER's logs with debugging turned on but I don't see
anything that looks like an error but I would be happy to provide them.
`openserctl moni` returns:
ERROR: Error opening OpenSER's FIFO /tmp/openser_fifo
ERROR: Make sure you have the line 'modparam("mi_fifo", "fifo_name",
"/tmp/openser_fifo")' in your config
ERROR: and also have loaded the mi_fifo module.
My openser.cfg looks like this:
debug=9 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
children=4
listen=192.168.20.151
dns=no
rev_dns=no
port=5060
mpath="/usr/local/lib/openser/modules/"
loadmodule "mysql.so"
loadmodule "postgres.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url",
"postgres://openser:openserrw@localhost/openser")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "db_url",
"postgres://openser:openserrw@localhost/openser")
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
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");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# 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);
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
# if you have some interdomain connections via TLS
#if(uri=~"@tls_domain1.net") {
# t_relay("tls:domain1.net");
# exit;
#} else if(uri=~"@tls_domain2.net") {
# t_relay("tls:domain2.net");
# exit;
#}
route(1);
};
# 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("host.doman.tld", "subscriber")) {
# www_challenge("host.domain.tld", "0");
# exit;
# };
save("location");
exit;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
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();
};
exit;
}
Any and all help appreciated.
--
Cliff Flood
Systems Administrator
Jazinga Inc.
Hi, ppl!
I have installed OpenSER and radius server. OpenSER authorized all
call through radius. How I can limit call duration by
"Session-Timeout" attribute from radius ?
--
tarantul
Hi All,
I am trying to implement serial forking and am using the
example on voice-systems website as a guide. The problem I am
experiencing is as follows.
Failure route rewrite ruri with the next uri to try and calls route[17]
route 17 performs a lookup("location"), finds the usrloc information
and rewrites ruri, however, when t_relay is called it uses the
original ruri (one before the lookup) to do t_relay.
Another issue I'm experiencing is that when processing call after
failure route, ruri_user_avp. Once i rewrite the uri in failure
route, I have to use the following to manually write a value for
ruri_user_avp. Can someone explain why this is happening?
Thanks in advance for your help!!
--
Zahid
]
Some relevant config and debug info:
modparam("lcr", "gw_uri_avp", "1400")
modparam("lcr", "ruri_user_avp", "1402")
route[18] { # used to process pstn/ off system calls
......
if (!is_avp_set("$avp(i:1402)")) {
xlog("L_INFO","$ci: route[22] ** setting ruri_user_avp **\n");
$avp(i:1402) = $rU;
xlog("L_INFO","$ci: route[22] ** setting ruri_user_avp = $avp
(i:1402) **\n");
}
........
} #end route 18
route[11] {
# load all numbers asscociated with the pilot number in $avp
(serial_fork) array
xlog("L_INFO","$ci: route[11] - M=$rm RURI=$ru F=$fu T=$tu IP=$si
\n");
$avp(serial_fork) = "sip:*6" + $rU + "@sipdev.oursiphost.com";
if (avp_db_query("select username from fork where pilot = $rU
order by pri" , "$avp(serial_fork)")) {
xlog("L_INFO", "route[11] $ci: method $rm r-uri <$ru>
\n");
xlog("L_INFO", "route[11] serial_fork = $avp
(serial_fork) remote-user = $rU \n");
t_on_failure("5");
route(17);
exit;
} else {
xlog("L_ERR", "route[11] failed to load serial_fork
info.\n");
}
avp_print(); # debugging only
setflag(8);
} # end of route[11]
route[17] {
xlog("L_INFO","$ci: route[17] - M=$rm RURI=$ru F=$fu T=$tu IP=$si
\n");
$avp(s:inv_timeout) = "10";
if (lookup("location")) { # currently online
registered UA.
xlog("L_INFO","$ci: route[17] - M=$rm RURI=$ru F=$fu T=$tu
IP=$si -- inside location lookup \n");
if (!t_relay()) {
sl_reply_error();
};
return;
} else { # not online
if (does_uri_exist()) { # but exists
xlog("L_INFO", "$ci: Subscriber is offline [$ru]\n");
sl_send_reply("480", "Temporarily Unavailable.");
return;
}
xlog("L_INFO","$ci: route[17] - M=$rm RURI=$ru F=$fu T=$tu
IP=$si -- outside location lookup \n");
};
if (uri=~"^sip:(([0-9()+-])|(%20))+@") {
subst_user('/[()+-]//g'); # strip out the punctuation.
subst_user('/%20//g'); # strip out the white space.
route(18); # all numerics just go to route(18) --
off system calls
return;
};
} # end route[17]
failure_route[5] {
xlog("L_INFO","$ci: failure_route[5] - M=$rm RURI=$ru F=$fu
T=$tu IP=$si\n");
avp_print();
if (avp_pushto("$ruri", "$avp(serial_fork)")) {
append_branch();
xlog("L_INFO","$ci: failure_route[5] $rm r-uri <$ru>
from <$fu> to <$tu>\n");
avp_delete("$avp(serial_fork)");
t_on_failure("5");
route(17);
} else {
xlog("L_INFO","$ci: failure_route[5] $rm r-uri <$ru>
from <$fu> to <$tu>\n");
}
}
Debug info
Aug 31 10:54:56 mousse openser[6815]: a410a3c1-
e4befc20-961fd447(a)10.1.12.174: failure_route[5] - M=INVITE RURI=sip:
10512@10.1.12.172:8891 F=sip:10510@sipdev.oursiphost.com T=sip:
10512(a)sipdev.oursiphost.com;user=phone IP=10.1.12.174
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039c28, flags=0x0003
Aug 31 10:54:56 mousse openser[6815]: INFO:
name=<inv_timeout>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<10 / 2>
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039bf0, flags=0x0002
Aug 31 10:54:56 mousse openser[6815]: INFO: id=<655>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<sip:10511@sipdev.oursiphost.com / 29>
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039bb8, flags=0x0002
Aug 31 10:54:56 mousse openser[6815]: INFO: id=<655>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<sip:10210@sipdev.oursiphost.com / 29>
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039b80, flags=0x0002
Aug 31 10:54:56 mousse openser[6815]: INFO: id=<655>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<sip:10510@sipdev.oursiphost.com / 29>
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039b48, flags=0x0002
Aug 31 10:54:56 mousse openser[6815]: INFO: id=<655>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<sip:*610512@sipdev.oursiphost.com / 31>
Aug 31 10:54:56 mousse openser[6815]: INFO:avpops:print_avp:
p=0xb6039b18, flags=0x0083
Aug 31 10:54:56 mousse openser[6815]: INFO:
name=<is_pilot>
Aug 31 10:54:56 mousse openser[6815]: INFO:
val_str=<y / 1>
Aug 31 10:54:56 mousse openser[6815]: DEBUG:avpops:pushto_avps: 1
avps were processed
Aug 31 10:54:56 mousse openser[6815]: ******* setting for branch 0
flags 0
Aug 31 10:54:56 mousse openser[6815]: a410a3c1-
e4befc20-961fd447(a)10.1.12.174: failure_route[5] INVITE r-uri <sip:
10511(a)sipdev.oursiphost.com> from <sip:10510@sipdev.oursiphost.com>
to <sip:10512@sipdev.oursiphost.com;user=phone>
Aug 31 10:54:56 mousse openser[6815]: DEBUG:avpops:delete_avps: 1
avps were removed
Aug 31 10:54:56 mousse openser[6815]: a410a3c1-
e4befc20-961fd447(a)10.1.12.174: route[17] - M=INVITE RURI=sip:
10511(a)sipdev.oursiphost.com F=sip:10510@sipdev.oursiphost.com T=sip:
10512(a)sipdev.oursiphost.com;user=phone IP=10.1.12.174
Aug 31 10:54:56 mousse openser[6815]: rewrite_uri: Rewriting Request-
URI with 'sip:10511@10.1.12.172:8891'
Aug 31 10:54:56 mousse openser[6815]: a410a3c1-
e4befc20-961fd447(a)10.1.12.174: route[17] - M=INVITE RURI=sip:
10511@10.1.12.172:8891 F=sip:10510@sipdev.oursiphost.com T=sip:
10512(a)sipdev.oursiphost.com;user=phone IP=10.1.12.174 -- inside
location lookup
Aug 31 10:54:56 mousse openser[6815]: DEBUG: mk_proxy: doing DNS
lookup...
Aug 31 10:54:56 mousse openser[6815]: DEBUG:sip_resolvehost2: no
port, no proto -> do NAPTR lookup!
Aug 31 10:54:56 mousse openser[6815]: DEBUG:filter_and_sort_naptr:
found valid SIP+D2U -> _sip._udp.sipdev.oursiphost.com
Aug 31 10:54:56 mousse openser[6815]: DEBUG:do_srv_lookup: SRV
(_sip._udp.sipdev.oursiphost.com) = mousse.cc.oursiphost.com:5060
Aug 31 10:54:56 mousse openser[6815]: DEBUG:sip_resolvehost2: found!
Aug 31 10:54:56 mousse openser[6815]: check_via_address(10.1.12.174,
10.1.12.174, 0)
Aug 31 10:54:56 mousse openser[6815]: DEBUG:tm:set_timer: relative
timeout is 500000
Aug 31 10:54:56 mousse openser[6815]: DEBUG: add_to_tail_of_timer[4]:
0xb6039eb4 (61500000)
Aug 31 10:54:56 mousse openser[6815]: DEBUG:tm:set_timer: relative
timeout is 30
Aug 31 10:54:56 mousse openser[6815]: DEBUG: add_to_tail_of_timer[0]:
0xb6039ed0 (91)
Aug 31 10:54:56 mousse openser[6815]: DEBUG:tm:relay_reply: branch=0,
save=1, relay=-1
>, CSEQ_N=<CSeq: 1> 2(a)sipdev.oursiphost.com;user=phone>ocal: using
FROM=<From: "Zahid 10510" <sip:
10510(a)sipdev.oursiphost.com>;tag=BF787F6-F6DD44ED
Aug 31 10:54:56 mousse openser[6815]: DEBUG: cancel_branch: sending
cancel...
Aug 31 10:54:56 mousse openser[6815]: DEBUG:tm:set_timer: relative
timeout is 500000
Aug 31 10:54:56 mousse openser[6815]: DEBUG: add_to_tail_of_timer[4]:
0xb6039e20 (61500000)
Aug 31 10:54:56 mousse openser[6815]: DEBUG:tm:set_timer: relative
timeout is 30
Aug 31 10:54:56 mousse openser[6815]: DEBUG: add_to_tail_of_timer[0]:
0xb6039e3c (91)
It's strange, but I do see the SIP INVITE messages being sent in the
ethereal log. Why they don't reach to the server? SER is connected
directly to the internet, without any NAT. On the other hand, REGISTER
messages do get to SER and the client recieves the 200 OK and all
intermediate replies as well.
I have attached the clientside ethereal log for you to see.
I am lost.
Harmeet
Hello, I am using the exec_dset for access to my database mysql and change
the uri in the calls, but I think this use more CPU processing, Are there
other module to do the same?
thanks
Jesus Teran B.
Hi,
I have configured openser-1.2 with a (commercial) third party radius
server and it is working great. Now I have a requirement where I need to
check a radius return attribute in case an access reject is received in
response to an authorization request. Is there some way I can do this in
the openser script.
Basically I want to send a 402 payment required message to a sip client in
case the call is rejected due low balance. In such cases radius returns a
status response code with access reject.
Thanks,
Danish
Hi allAfter spending whole week reading and googling I am writing here. Hope someone from here can help me.Here is my setup -I have a Fedora 7 desktop with SER, mysql, and rtpproxy running. This is connected directly to the cable modem. There is not NAT in between. Firewall and SELinux are disabled.I have X-Lite client on my Laptop connected to a Wi-Fi router on a different IP. This router has NAT but the firewall is disabled in the router.On the far end, my sister has X-Lite on her desktop which is also behind NAT.Both X-Lite clients can REGISTER and the SIP server sends 200 OK. But can't make calls.When all clients and SER are on the same network with local IP addresses, I can make calls between the X-Lite clients and SJPhone on different computers. No problem. And Grandstream phones also work in the local setup.Any help is appreciated.HS
Hello,
Say I have something like the following:
$avp(a[0]) = "27*"
$avp(a[1]) = "22*"
Then I run avp_substr like the following: avp_subst("$avp(a)/g",
"/\*/[0-9]/g");
As you would expect it to simply strip * from the avp list values, instead
it decides to rewrite the index in numerical order, so the avp's would now
look like:
[ BAD RESULTS ]
$avp(a[0]) = "22";
$avp(a[1]) = "27";
however the [ EXPECTED RESULTS ]
$avp(a[0]) = "27";
$avp(a[1]) = "22";
Could someone please elaborate on why OpenSER would re-numerate the list
index on a simple avp_substr, also any ideas on how I can get around this
and stop this from happening? Thanks!
Dear all, I'm using Debian Etch + Asterisk 1.2.13 as our VoIP server. I
have several clients talking to each other but now I need to implement
presence+instant messaging also. People told me that Asterisk does not
support presence+IM, so I have to use another SIP server like OpenSER.
I've never used OpenSER so I need to know the following:
Is Openser enough to get just several X-Lite (softphones) clients using
voip+presence+IM, without connecting to the PSTN ??? Or do I need the
integration with Asterisk to get what I need ???
Really thanks
Alejandro
Hello,
What is the best solution to use openser to hide the topology between the customer and supplier?
Thanks.
KChris.
---------------------------------
Why delete messages? Unlimited storage is just a click away.