[Serusers] SER & Radius Acct
Daniel-Constantin Mierla
daniel at iptel.org
Fri Mar 19 11:37:29 CET 2004
To turn on/off an acc type you have to take the sources and edit by hand
the Makefile from modules/acc. The file is self-explanatory.
In your case I guess you dont have compiled radius support in acc but
db(mysql or postgress) and you have to load one of those modules.
.Daniel
On 3/19/2004 8:57 AM, antontran at fptnet.com.vn wrote:
>
>
>Hi List,
>
>Is the Radius HOWTO (http://www.iptel.org/ser/doc/ser_radius/ser_radius.html)
>is correct when it stated that
>"
> To enable RADIUS accounting simply use radius_log_flag and
>radius_log_missed_flag parameters instead of log_flag and log_missed_flag.
>Mark transactions that should be logged with flags configured in the parameters. "
>
>but in README under ser/sip_router/modules/acc, I don't find any export
>parameter "radius_log_flag", and when I did as in Radius HOWTO (as above) I
>received :
>0(7757) set_mod_param_regex: parameter <radius_log_flag> not found in module <acc>
> 0(7757) parse error (43,38-39): Can't set module parameter
>ERROR: bad config file (1 errors)
>
>But without it, I received:
>acc - initializing
> 0(7767) ERROR: acc: init_child bind_db failed...did you load a database module?
> 0(7767) init_mod(): Error while initializing module acc
>
>My ser.cfg is:
>====================
>debug=3
>fork=yes
>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"
>alias="fptnet.vn"
>alias="hnluat.edu"
>alias="sgluat.edu"
>alias="sg.fptnet.com"
>alias="fptnet.com"
>
>#loadmodule "/usr/local/lib/ser/modules/mysql.so"
>#loadmodule "/usr/local/lib/ser/modules/postgres.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/uri_radius.so"
>#loadmodule "/usr/local/lib/ser/modules/uri.so"
>loadmodule "/usr/local/lib/ser/modules/auth.so"
>#loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>loadmodule "/usr/local/lib/ser/modules/auth_radius.so"
>loadmodule "/usr/local/lib/ser/modules/acc.so"
>loadmodule "/usr/local/lib/ser/modules/xlog.so"
>#modparam("usrloc", "db_mode", 0)
>#modparam("uri_radius", "service_type", 11)
>#modparam("rr", "enable_full_lr", 1)
>modparam("auth_radius", "radius_config",
>"/usr/local/etc/radiusclient/radiusclient.conf")
>modparam("acc", "radius_config", "/usr/local/etc/radiusclient/radiusclient.conf")
>modparam("xlog", "buf_size", 8192)
>
>
>###
>modparam("acc", "log_level", 1)
>modparam("acc", "log_flag" , 1)
>modparam("acc", "radius_flag", 1)
>modparam("tm", "fr_inv_timer", 15 )
>modparam("tm", "fr_timer", 10 )
>modparam("auth", "secret", "testing123")
>modparam("auth_radius", "service_type", 15)
>###
>route{
>
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483","Too Many Hops");
> break;
> };
># if ( msg:len > max_len ) {
># sl_send_reply("513", "Message too big");
># break;
># };
>
> record_route();
> if (loose_route()) {
> t_relay();
> break;
> };
>
> if (uri==myself) {
> xlog("L_ERR", " method <%rm> <%fu> <%tu>\n");
> if (method=="REGISTER") {
># # if (!www_authorize("mydomain", "subscriber")) {
> if (!radius_www_authorize("")) {
> www_challenge("", "0");
> break;
> };
>
> save("location");
> break;
> };
> setflag(1);
> if (method=="INVITE") record_route();
>
> if (method=="REGISTER") {
> log(1, "REGISTER received\n");
> } else {
> log(1, "non-REGISTER received\n");
> };
> if (uri=~"sip:.*[@:]fptnet.vn") {
> log(1, "request for fptnet.vn\n");
> } else {
> log(1, "request for other domain received\n");
> };
>
> if (!lookup("location")) {
> sl_send_reply("404", "Not Found");
> break;
> };
> #};
> if (!t_relay()) {
> sl_reply_error();
> };
>
> };
>}
>
>
>========================
>
>How to setup acct to plain text file, while authentification via radius ?
>( I would like to see what the acct details looked like to prepare acct table
>for radius ).
>
>Thank you very much for any reply.
>Best regards
>
>Anton,
>
>
>
>
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>
>
More information about the sr-users
mailing list