Hi there
I'm using ser v 0.9.6 and Freeradius v 1.1.0 on Ubuntu 5.10. I've set up SER
and implemented the radius accounting and it is working, except that it will
record the start and stop for a call, and then 20 seconds later will create
duplicate entries for the call. The duration is exactly the same, except the
start and stop are offset by 20 secs. Does anyone know why this is
happening? I've spent hours trawling the list and haven't found a solution
for the problem.
I'm pretty new to SER to apologies if there is anything obviously wrong.
My ser.cfg is as follows:
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/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"
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_radius.so"
loadmodule "/usr/lib/ser/modules/acc_radius.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 0)
#set auth_radius exported parameters
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radiusclient.conf")
modparam("auth_radius","service_type",12)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
#modparam("usrloc", "db_mode", 2)
# accounting stuff
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "radius_config",
"/usr/local/etc/radiusclient/radiusclient.conf")
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)
modparam("acc", "service_type", 15)
modparam("acc", "report_ack", 0)
#random string for authentication
modparam("auth", "secret",
"59t8eu4gnajdfg98qbuoarisdfhgjv-98iuQE[AFJV9M8CRWUPDXIN")
# -- 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{
if (!search("^(f|From):.*192.168.0.36"))
{
break;
};
# 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 a UA is attempting a register or invite, authorize him
if(method == "REGISTER" || method == "INVITE")
{
log(1, "Attempting to authenticate user on domain 192.168.0.36");
if(!radius_www_authorize("192.168.0.36"))
{
log(1, "User authentication on domain 192.168.0.36 failed");
www_challenge("192.168.0.36","1");
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();
if (method == "ACK")
{
route(2);
break;
};
if (method=="INVITE") {
log(1, "INVITE MESSAGE RECEIVED - START ACCOUNTING\n");
setflag(1);
};
if (method=="BYE" || method=="CANCEL") {
log (1, "BYE/CANCEL RECEIVED - STOP ACCOUNTING\n");
setflag(1);
route(2);
break;
};
# 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");
};
if (!uri==myself)
{
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
};
# 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")
{
log(1, "User registered on domain 192.168.0.36");
save("location");
sl_send_reply("200", "ok");
break;
}
else
{
# lookup("aliases");
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location"))
{
log(1, "Unknown user referenced for domain 192.168.0.36,
exiting (404)");
sl_send_reply("404", "Not Found");
break;
};
};
};
append_hf("P-hint: usrloc applied\r\n");
route(2);
}
route[2]
{
if (!t_relay()) {
sl_reply_error();
};
}
The accounting logs are as follows:
Wed Apr 19 12:20:43 2006
Acct-Status-Type = Start
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = 1
User-Name = "seb(a)192.168.0.36"
Calling-Station-Id = "sip:Seb@192.168.0.36"
Called-Station-Id = "sip:0824152727@192.168.0.36"
Sip-Translated-Request-URI = "sip:0824152727@192.168.0.37:5070"
Acct-Session-Id = "xzszxqjpwygwkky(a)192.168.0.36"
Sip-To-Tag = "8004"
Sip-From-Tag = "lazwk"
Sip-Cseq = "778"
NAS-Port = 5060
Acct-Delay-Time = 0
NAS-IP-Address = 127.0.0.1
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "1877d2d9ca784853"
Stripped-User-Name = "seb"
Realm = "192.168.0.36"
Freeradius-Proxied-To = 192.168.0.36
Timestamp = 1145442043
Wed Apr 19 12:20:51 2006
Acct-Status-Type = Stop
Service-Type = Sip-Session
Sip-Response-Code = 200
Sip-Method = 8
User-Name = "0824152727(a)192.168.0.36"
Calling-Station-Id = "sip:0824152727@192.168.0.36"
Called-Station-Id = "sip:Seb@192.168.0.36"
Sip-Translated-Request-URI = "sip:Seb_192_168_0_36@192.168.0.36:5061"
Acct-Session-Id = "xzszxqjpwygwkky(a)192.168.0.36"
Sip-To-Tag = "lazwk"
Sip-From-Tag = "8004"
Sip-Cseq = "391"
NAS-Port = 5060
Acct-Delay-Time = 0
NAS-IP-Address = 127.0.0.1
Client-IP-Address = 127.0.0.1
Acct-Unique-Session-Id = "badf62373eccd795"
Stripped-User-Name = "0824152727"
Realm = "192.168.0.36"
Freeradius-Proxied-To = 192.168.0.36
Timestamp = 1145442051
As you can see, it seems to be generating another accounting report
corresponding to a call going the other way. The first entry is correct. The
second just seems to appear 20 secs after the call has been disconnected.
There are corresponding stops for both entries as well as entries into the
mysql database. Any ideas?
Thanks in advance
Sebastian
Hi All,
We made a VOIP application for PDA's (PALM OS) and we are using both SER
and Asterisk. SER is SIP proxy and it routes all the calls to Asterisk. On SER
we have RTPProxy also. My problem is that I am getting a weird noise or
disturbance for all the calls at an approximate time interval of 100-120
seconds and we are getting this noise consistently. After 5-10 seconds
everything will be fine till next 100-120 seconds. We are using GSM codec on
client side with GSM voip provider. Can you please tell me where it is going
wrong and where can I change or improve things for better voice quality? Is
there any echo which is causing this?
Thanks,
Manoj.
Hi all,
i am new user in SER, I installed the ser and configured 2 user client and they are working properly with SER. Now my next step is to connect the SER with Asterisk on the LAN. Can, anybody help me how to configure the SER and Asterisk to listen each other....my ser configuration file is as
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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
debug=7
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 ----------------------------------
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/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"
loadmodule "/usr/lib/ser/modules/acc.so"
loadmodule "/usr/lib/ser/modules/exec.so"
loadmodule "/usr/lib/ser/modules/group.so"
loadmodule "/usr/lib/ser/modules/print.so"
loadmodule "/usr/lib/ser/modules/textops.so"
#loadmodule "/usr/lib/ser/modules/uri.so"
# ----------------- setting module-specific parameters ---------------
# ------------- tm parameters
#modparam("tm", "fr_timer", 12)
#modparam("tm", "fr_inv_timer", 24)
# ------------- rr parameters
# set ";lr" tag to â;lr=trueâ
modparam("rr", "enable_full_lr", 1)
# ------------- accounting parameters
modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
# ------------- usrloc parameters
# 2 enables write-back to persistent mysql storage for speed
# disable=0, write-through=1
modparam("usrloc", "db_mode", 2)
# minimize write back window - default is 60 seconds
modparam("usrloc", "timer_interval", 10)
# database location
modparam("usrloc", "db_url", "sql://serro:47serro11@localhost/ser")
# ------------- auth parameters
# database location
modparam("auth_db", "db_url", "sql://serro:47serro11@localhost/ser")
# allows clear text passwords in the mysql database
modparam("auth_db", "calculate_ha1", yes)
# name of password column in mysql database
modparam("auth_db", "password_column", "password")
# ------------------------- request routing logic -------------------
# main routing logic
route{
# stop forwarding at 10 hops to prevent infinite loops
if (!mf_process_maxfwd_header("10")) {
log(1, "LOG: Too many hops\n");
sl_send_reply("483", "Too many hops");
break;
};
if ( msg:len > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# prevents private ip space from being used
if (search("^(Contact|m): .*(a)(192\.168\.|172\.16)")) {
if (method=="REGISTER") {
log(1, "LOG: Someone trying to register from private IP\n");
sl_send_reply("479", "Please don't use private IP addresses" );
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
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
break;
};
# All REGISTER attempts are processed and must always be authenticated
if (uri==myself)
{
if (method=="REGISTER")
{
# make sure that users don't register infinite loops
if (search("^(Contact|m): .*(a)(10\.19\.200\.81|(proxy\.)?localhost)")) {
log(1, "LOG: alert: someone trying to set aor==contact\n");
sl_send_reply("476", "No Server Address in Contacts Allowed" );
break;
};
# challenge/response
if (!www_authorize("10.19.200.81", "subscriber"))
{
www_challenge("10.19.200.81", "0");
break;
};
# only registered users are allowed
# if (!is_user("replicator") & !check_to()) {
# log(1, "LOG: unregistered user registration attempt\n");
# sl_send_reply("403", "Only registered users are allowed");
# break;
# };
save("location");
break;
};
}
}
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
Best Regards,
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
Do you know if there is a debian package of the version 1.1.x? I'm searching for it but still got none.
Thanks
Davide
-----Messaggio originale-----
Da: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
Inviato: mercoledì 19 aprile 2006 14.27
A: D'Addelfio Davide
Cc: users openser.org
Oggetto: Re: R: [Users] Storing all messages into DB
D'Addelfio Davide wrote:
> Hi Klaus,
>
> I have not siptrace module in my openser cause I have 1.0.x version, so I can't use that module...!
> I'm trying to use t_on_reply but it doesn't work fine.
With openser 1.0 there is no solution to your problem. But you can use
ngrep or tcpdump to capture SIP messages outside of ser.
regards
klaus
ps: please Cc the list
>
> Any thought?
>
> -----Messaggio originale-----
> Da: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
> Inviato: mercoledì 19 aprile 2006 13.19
> A: D'Addelfio Davide
> Cc: users(a)openser.org
> Oggetto: Re: [Users] Storing all messages into DB
>
> The accounting module accounts "transactions". If you want to keep all
> sip messages, take a look at the siptrace module in openser CVS head.
>
> regards
> klaus
>
> D'Addelfio Davide wrote:
>> Hi all,
>>
>>
>>
>> i've setup cfg file to store messages into acc table of mysql db. My
>> problem is that it stores only the input messages, like register and
>> invite, instead I need to store also the reply messages from openser,
>> how can I do?
>>
>>
>>
>> Thanks for help me...
>>
>> Davide
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users(a)openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>
Ok, thanks!
I will take a look.
-----Messaggio originale-----
Da: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
Inviato: mercoledì 19 aprile 2006 14.27
A: D'Addelfio Davide
Cc: users openser.org
Oggetto: Re: R: [Users] Storing all messages into DB
D'Addelfio Davide wrote:
> Hi Klaus,
>
> I have not siptrace module in my openser cause I have 1.0.x version, so I can't use that module...!
> I'm trying to use t_on_reply but it doesn't work fine.
With openser 1.0 there is no solution to your problem. But you can use
ngrep or tcpdump to capture SIP messages outside of ser.
regards
klaus
ps: please Cc the list
>
> Any thought?
>
> -----Messaggio originale-----
> Da: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
> Inviato: mercoledì 19 aprile 2006 13.19
> A: D'Addelfio Davide
> Cc: users(a)openser.org
> Oggetto: Re: [Users] Storing all messages into DB
>
> The accounting module accounts "transactions". If you want to keep all
> sip messages, take a look at the siptrace module in openser CVS head.
>
> regards
> klaus
>
> D'Addelfio Davide wrote:
>> Hi all,
>>
>>
>>
>> i've setup cfg file to store messages into acc table of mysql db. My
>> problem is that it stores only the input messages, like register and
>> invite, instead I need to store also the reply messages from openser,
>> how can I do?
>>
>>
>>
>> Thanks for help me...
>>
>> Davide
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users(a)openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>
D'Addelfio Davide wrote:
> Hi Klaus,
>
> I have not siptrace module in my openser cause I have 1.0.x version, so I can't use that module...!
> I'm trying to use t_on_reply but it doesn't work fine.
With openser 1.0 there is no solution to your problem. But you can use
ngrep or tcpdump to capture SIP messages outside of ser.
regards
klaus
ps: please Cc the list
>
> Any thought?
>
> -----Messaggio originale-----
> Da: Klaus Darilion [mailto:klaus.mailinglists@pernau.at]
> Inviato: mercoledì 19 aprile 2006 13.19
> A: D'Addelfio Davide
> Cc: users(a)openser.org
> Oggetto: Re: [Users] Storing all messages into DB
>
> The accounting module accounts "transactions". If you want to keep all
> sip messages, take a look at the siptrace module in openser CVS head.
>
> regards
> klaus
>
> D'Addelfio Davide wrote:
>> Hi all,
>>
>>
>>
>> i've setup cfg file to store messages into acc table of mysql db. My
>> problem is that it stores only the input messages, like register and
>> invite, instead I need to store also the reply messages from openser,
>> how can I do?
>>
>>
>>
>> Thanks for help me...
>>
>> Davide
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users(a)openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>
Hi all,
i've setup cfg file to store messages into acc table of mysql db. My
problem is that it stores only the input messages, like register and
invite, instead I need to store also the reply messages from openser,
how can I do?
Thanks for help me...
Davide
Hi,
I use openser 1.0.1 and tried CVS version with the same config. Something
is wrong with AVP's or I don't know something ?
Here are relevant config lines:
modparam("tm", "fr_inv_timer_avp", "inv_timeout")
modparam("auth", "rpid_avp", "rpid")
xlog("L_ALERT", "rpid_avp = $avp(rpid)\n");
0(0) xl_parse_vname: error - avp alias [rpid] not found!
0(0) XLOG:xdbg_fixup: ERROR: wrong format[rpid_avp = $avp(rpid)
avp_write("i:45", "inv_timeout");
0(0) ERROR:avpops:fixup_write_avp: bad attribute name in param 2 <inv_timeout>
Something is changed or is it a bug ?
I should use new exec_dset features (additional parameters)
Thanks,
imedve
I try to install SERweb 0.9.4 is running with SER 0.9.6 ( Is it OK?)
SER is running OK but I don't have software to test the connection is
managed by SER. Anyone have software to test its?
My major problem is: SERWeb is running OK with user. I can create, update,
delete user using account of normal user.
But I cannot access to admin mode using default username ( admin ) and
default password ( heslo ). The phenomenon of error is: (Only one line to
describe this error).
Bad username or password
Only one line to describe this error.
I try to solve this problem rely on previous resolved similar problems in
our mailing lists. But it still have this problem.
Thanks a lot for any solution of this,
Phuong Nguyen
IP Clients Group
ESCS Dept
TMA company.
http://www.tma.com.vn/