[Serusers] accounting with radius also not logging

Iqbal iqbal at gigo.co.uk
Wed Oct 13 22:11:33 CEST 2004


Hi

After having tried mysql accounting, I dropped it and recompiled acc.so
to support radius, well again it all logs in successfully, and
authenticates the user with the user in the radius database.

BUT once again when I try to send accouting packets it fails, I have
checked all the docs, set the setflag command etc etc, and my config is
below...but I still see no errors on ser debug or even in mysql.


------------------------
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/mysql.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so"


modparam("rr", "enable_full_lr", 1)
modparam("acc","log_level",1)
modparam("auth_radius","radius_config","/usr/local/etc/radiusclient/radiusclient.conf")
modparam("auth_radius","service_type",15)
modparam("acc", "db_url",
"mysql://ser_usr:p1cK0@193.218.160.14/ser")
modparam("acc", "service_type", 15)
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 3)

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 > max_len ) {
                sl_send_reply("513", "Message too big");
                break;
        };
        record_route();

if (method=="INVITE" || method=="BYE" || method=="CANCEL") {
setflag(1);
};

#Authorise via radius


                if (method=="REGISTER") {


                 if (!radius_www_authorize("")) {
                                www_challenge("", "1");
                        };

                        save("location");
                        break;
                };




}

-----------------

Now this seems to be the simplest config I can have, the UA authenticates
fine, when I dial a number, I see the invite message appearing in the
debug logs of SER



---------
12(10813) SIP Request:
12(10813)  method:  <INVITE>
12(10813)  uri:     <sip:3333333 at server.com>
12(10813)  version: <SIP/2.0>
12(10813) parse_headers: flags=1
12(10813) Found param type 235, <rport> = <n/a>; state=6
12(10813) Found param type 232, <branch> =
<z9hG4bK7991809E736B4750A6A288DC25D3FFD4>; state=16
12(10813) end of header reached, state=5
12(10813) parse_headers: Via found, flags=1
12(10813) parse_headers: this is the first via
12(10813) After parse_msg...
12(10813) preparing to run routing scripts...
12(10813) DEBUG : is_maxfwd_present: searching for max_forwards header
12(10813) parse_headers: flags=128
12(10813) end of header reached, state=9
12(10813) DEBUG: get_hdr_field: <To> [34]; uri=[sip:3333333 at server.com]
12(10813) DEBUG: to body [<sip:3333333 at server.com>
---------------

hence I figure that th INVITE tag should get recognised and using the
setflag(1) parameter and radius_flag section, it should all work...but
it dont :-(...help

Iqbal




More information about the sr-users mailing list