Hi everybody,
I just commited on the CVS a grand ACC restructuring and clean-up. Here
is form commit log:
- simplify internal logic for preparing and message selection
- more efficient data collection
- eliminate the FMT-based accounting; instead of it, a default set of
basic values are all the time accounted; for more, extra accounting
should be used -> this leads to a more selective / flexible /
performant
accounting
- pre-builds sets of names / columns / RADIUS AVPs / DIAMETER AVPs
instead
of doing it each time a request is accounted
- "n/a" string for not found/available values replaced with empty
string ""
- eliminated a lot of un-necessary functions - heritage from the all TM
callback design (pre pre-transaction transaction)
- DB accounting table redesigned
- accounting logic separated in a new file for a better modularity.
- implemented an accounting environment for storing data; helps in
reducing
the number of function's parameters and of internal functions; more
important, useless conversions from str to int and to int again are
eliminated
The most important change was the drop of FMTs for a more flexible
system: have a basic set of values used of call matching, plus the usage
of extra accounting for anything more. The basic set is defined to :
method name
From URI
From TAG
To URI
To TAG
CallID
Cseqno
Reply code
Reply reason
Time stamp
having a timestamp generated by the proxy instead by the backend
(syslog, RADIUS server, SQL server) is important as it is more accurate
- the delays due transport to the backend server are eliminated. Also
the time is logged in UNIX timestamp format to avoid confusions about
timezones.
From how to use it (enabling acc via flags), nothing changed :)..only
some module parameters were lost. For more details, please see:
http://openser.org/docs/modules/1.2.x/acc.html
any feedback is welcomed
regards,
bogdan
> Basically I am trying to find out a way of checking for minimum and
> maximum digit length dialled by our users, in order to filter some
> of the traffic through our OpenSER server. Dialling rules aside, is
> there a way?
Unless I missed it, no one told the guy what he needs to know.
Instead, he is pointed at a lengthy specification for posix regular
expressions. I know there is value in teaching a guy to fish, but at
some point someone has to just answer the question...
This
if (uri=~"sip:[0-9]{10,24}") {
...
}
will match a sequence of digits between 10 and 24 in length (inclusive).
Now, the above is not a great test in practice. I don't know how long
the longest number can be outside the North American Numbering plan
(where it is relatively easy: 1-NXX-NXX-XXXX, see nanpa.com).
And there are restrictions on the first few digits that you might
want to check, depending on where you are in the world.
I'm sure that someone reading this list has already got the ultimate,
global, number checker coded for openser... it's just a question of
whether they'll cough it up in public.
-mark
Is it possible in someway to extract the actual number of active
sessions in RTP Proxy. There is sessions_created variable but its a
cumulative count of sessions created.
Gaurav
I'm having a lot of difficulty compiling OpenSER on Solaris 10. Firstly
I was missing a lot of packages which I needed to download from
sunfreeware.com (gcc, ld) the /usr/bin/ccs version of make does not work
on the makefile
here is the error:
bash-3.00# make
make: Fatal error in reader: Makefile.sources, line 18: Unexpected end
of line seen
I looked in the file but I don't see how it would complaing of some
unexpected end of line.
I then followed to try GNU's make I downloaded. and then I get an error
on the /usr/bin/ccs/lex and yacc's (it mentioned to use yacc and not
bison) the error was:
bash-3.00# /usr/local/bin/make all
yacc -d -b cfg cfg.y
conflicts: 1 shift/reduce
lex cfg.lex
"cfg.lex":line 102: Error: missing translation value
make: *** [lex.yy.c] Error 1
Then I decided to try flex instead of lex.
bash-3.00# /usr/local/bin/make all
yacc -d -b cfg cfg.y
conflicts: 1 shift/reduce
flex cfg.lex
flex: fatal internal error, exec failed
make: *** [lex.yy.c] Broken Pipe
make: *** Deleting file `lex.yy.c'
so I'm kindda stuck, it's apparently been compiled on the x68 s10
platform before so there must be some sort of makefile modifications I
must make everywhere ?
Anyone know what may be going on? I was hoping there would be a package
OpenSER version for solaris built somewhere :S
Thanks!
Nick
Hello,
Can I authenticate the openser locally? I want the user that do local login (in the computer of the server) can be authenticate in openser server. Its possible?
Thanks.
---------------------------------
Yahoo! Search
Música para ver e ouvir: You're Beautiful, do James Blunt
Good afternoon,
I have a small openser test rig with rtpproxy running as a bridge
between two networks:
rtpproxy -l <public IP>/<private IP> -s /tmp/rtpproxy.sock
This works well apart from one issue.
I have set up two handsets for an extension, one on the public network and
one on the private network. The idea is to provide one phone in the office
and one at home, so I can pick up at either location when someone calls.
If I call the extension both handsets ring correctly, but audio is only
set up correctly for one of the two handsets when I pick up. Everything
works fine if both phones are on the public or the private network.
I infer that this is because primitives working on the ruri and friends:
avp_write("$ruri/domain", "i:20");
only work on the address of the first registered handset that they find,
even if lookup("location") has created multiple branches.
Does anyone have any ideas or workarounds which would allow me to set up
multiple handsets for a given extension when bridge mode is involved?
I tried abusing the aliases table to redirect an incoming call onto
multiple SIP URIs. It looks like rtpproxy indexes by Call-ID, and hence
struggles with multiple branches which share a single Call-ID.
Thanks,
--
David Carter Email: David.Carter(a)ucs.cam.ac.uk
University Computing Service, Phone: (01223) 334502
New Museums Site, Pembroke Street, Fax: (01223) 334679
Cambridge UK. CB2 3QH.
Hi andrey,
I have made suggested changes in ser.cfg as follows
listen=202.87.x.x
alias=202.87.x.x
and did
#export SIP_DOMAIN=202.87.x.x
I get following log when try to start SER
#/etc/rc.id/init.d/ser start
------------log starts here--------------------
Starting ser:
0(5116) WARNING: fix_socket_list: could not rev. resolve 202.87.x.x
0(5116) WARNING: fix_socket_list: could not rev. resolve 202.87.x.x
WARNING: no fork mode
stateless - initializing
0(0) Maxfwd module- initializing
textops - initializing
0(0) INFO: udp_init: SO_RCVBUF is initially 110592
Listening on
udp: 202.87.x.x [202.87.x.x]:5060
tcp: 202.87.x.x [202.87.x.x]:5060
Aliases:
*: 202.87.x.x:*
0(0) INFO: udp_init: SO_RCVBUF is finally 262142
0(0) ERROR: udp_init: bind(6, 0x810237c, 16) on 202.87.x.x: Cannot
assign requested address
[FAILED]
------------log ends here----------------------
please advice.
Regards
Mukesh
From: "Andrey Kuprianov" <andrey.kouprianov(a)gmail.com>
Subject: Re: [Serusers] Using IP address as domain
To: serusers(a)iptel.org
Message-ID:
<ab5f5bda0609210935y71edb46ci6ea9966b170e52de(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
AFAIK, SIP_DOMAIN you need to export anyway.. Just put your IP instead
of the name. Then this SIP_DOMAIN will be used to properly add
contacts to your subscriber table. So, if your domain is an IP
address, newly added ppl will have an IP instead of domain for their
host part of URI. Try also to specify alias as you IP address, i.e.
listen="202.x.x.x"
alias="202.x.x.x"
You may also try to add a domain entry to the domain table with serctl
(that is if you use functions in your config such as
"is_uri_host_local()"), i.e.
serctl domain add 202.x.x.x
Hope it will work for you.
Andrey.
On 9/20/06, mukesh <mukesh(a)hungama.com> wrote:
> Hi friends,
> I have SER (with database support) running on my linux box. But I
do
> not have a domain name registered for the IP of this machine but it does
> have a public IP (202.87.xx.xxx) address which allows me access it from
> outside.
>
> If I try to access (using sipsak client) a uri from local system it
> fails.
> example URIs I am trying are ...
> sip:mukesh@<public ip>
> sip:mukesh@<public ip>:5060
>
> ...with no result :(
>
> I referred http://mit.edu/sip/sip.edu/ser.shtml to configure my
> ser.cfg.
>
> So the question is How can I connect to SER using IP and do I need
> to use "# export SIP_DOMAIN=<public ip>"?
>
> Regards
> Mukesh
Hi andrey,
I have made follwing changes in ser.cfg
listen="202.87.x.x"
alias="202.87.x.x"
#export SIP_DOMAIN = 202.87.x.x
when I run
# /etc/rc.d/init.d/ser restart
I get this log
----------------------log starts here -------------------------
Starting ser: 0(5116) WARNING: fix_socket_list: could not
rev. resolve 202.87.x.x
0(5116) WARNING: fix_socket_list: could not rev. resolve 202.87.x.x
WARNING: no fork mode
stateless - initializing
0(0) Maxfwd module- initializing
textops - initializing
0(0) INFO: udp_init: SO_RCVBUF is initially 110592
Listening on
udp: 202.87.x.x [202.87.x.x]:5060
tcp: 202.87.x.x [202.87.x.x]:5060
Aliases:
*: 202.87.x.x:*
0(0) INFO: udp_init: SO_RCVBUF is finally 262142
0(0) ERROR: udp_init: bind(6, 0x810237c, 16) on 202.87.x.x: Cannot
assign requested address
[FAILED]
[root@oradb1 /]#
----------------------log ends here -------------------------
Regards
Mukesh
From: "Andrey Kuprianov" <andrey.kouprianov(a)gmail.com>
Subject: Re: [Serusers] Using IP address as domain
To: serusers(a)iptel.org
Message-ID:
<ab5f5bda0609210935y71edb46ci6ea9966b170e52de(a)mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
AFAIK, SIP_DOMAIN you need to export anyway.. Just put your IP instead
of the name. Then this SIP_DOMAIN will be used to properly add
contacts to your subscriber table. So, if your domain is an IP
address, newly added ppl will have an IP instead of domain for their
host part of URI. Try also to specify alias as you IP address, i.e.
listen="202.x.x.x"
alias="202.x.x.x"
You may also try to add a domain entry to the domain table with serctl
(that is if you use functions in your config such as
"is_uri_host_local()"), i.e.
serctl domain add 202.x.x.x
Hope it will work for you.
Andrey.
On 9/20/06, mukesh <mukesh(a)hungama.com> wrote:
> Hi friends,
> I have SER (with database support) running on my linux box. But I
do
> not have a domain name registered for the IP of this machine but it does
> have a public IP (202.87.xx.xxx) address which allows me access it from
> outside.
>
> If I try to access (using sipsak client) a uri from local system it
> fails.
> example URIs I am trying are ...
> sip:mukesh@<public ip>
> sip:mukesh@<public ip>:5060
>
> ...with no result :(
>
> I referred http://mit.edu/sip/sip.edu/ser.shtml to configure my
> ser.cfg.
>
> So the question is How can I connect to SER using IP and do I need
> to use "# export SIP_DOMAIN=<public ip>"?
>
> Regards
> Mukesh
> Hello ,
>
> has anyone any experience on testing SER with SIPP ??
>
> I've sent the following mail to sipp-users mailing list, I'm sending
it
> also here, in case anyone has any idea or experience.
This may not be exactly what you want to test but I've done tests with
SIPp and various SIP proxies, SER being one of them, by targeting the
UAS itself on the SIPp command line but with a "remote sending address"
parameter specifying the proxy to use. This works great and does not
require the 'service' user to be known to SER as it simply looks at the
hostname (or ip address) part of the URI to proxy the call.
This gives the following modified command lines:
UAC :
./sipp -sn uac 2.2.2.2 -r 1 -m 1 -d 5000 -i 1.1.1.1 -rsa 3.3.3.3
UAS :
./sipp -sn uas -rsa 3.3.3.3
The remote sending address is similar to the "outbound proxy" parameter
found on many SIP phones.
This way of running SIPp gives the call flow you describe but shortcuts
most of the ser.cfg routing logic as uri!=myself.
Regards,
-David
Hi
We have two asterisks registered as UA's. SER is acting as a proxy server.
We want to make calls between two asterisk users through SER. One asterisk
server has extensions starting with 2, and the other one has extensions
starting with 4. We route the calls based on the first digit. We are unable
to call from an extension on one asterisk server to the other asterisk
server. "rewritehostport" doesn't seem to be doing the trick for us. Does
anyone have a solution? Below is our ser.cfg file:
=====================SER.CFG=====================
#
# $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=9 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines for debugging */
#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"
fifo_mode=0666
fifo_db_url="mysql://ser:heslo@192.168.1.60 /ser"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/textops.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/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;
};
if(method == "INVITE") {
if (uri =~ "sip:2[0-9]{3}@*"){
log(1, "Forwarding to PakVista BlueFlash\n");
route(2);
break;
}
else if (uri =~ "sip:4[0-9]{3}@*"){
log(1, "Forwarding to MyRoom BlueFlash\n");
route(3);
break;
}
}
log(1, "After INVITE\n");
# 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();
log(1, "After REGISTER\n");
# 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) {
log(1,"Inside NOT uri==myself \n");
# 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) {
log(1, "Inside uri==myself\n");
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication
if (!www_authorize("192.168.1.60", "subscriber")) {
www_challenge(" 192.168.1.60", "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")) {
log(1, "location Not Found\n");
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
log(1, "Inside route 1\n");
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
route[2]
{
log(1, "Inside route 2\n");
rewritehostport("192.168.1.61:5060");
if (!t_relay()) {
log(1, "t_relay error\n");
sl_reply_error();
};
log(1, "Leaving route 2\n");
}
route[3]
{
log(1, "Inside route 3\n");
rewritehostport("192.168.1.62");
if (!t_relay()) {
log(1, "t_relay error\n");
sl_reply_error();
};
#forward(uri:host, uri:port);
log(1, "Leaving route 3\n");
===============================EOF========================