[Serusers] my acc table works !!!

zhu lizhong zhulizhong at gmail.com
Thu Jul 28 04:29:38 CEST 2005


Hello, guys:
I sent a help message to you before since I got problems in acc
tables. Now i made some changes, and it finally works. thanks you for
guys. now I want to share my tips to you who are need acc records,
because many people have this problem.
first, make sure that you must confiugre Makefile in acc module and
recompile it properly.
second load acc module into ser.cfg. 
third, put all necessary into ser and route section. 
please follow the sequences. maybe some parts are not really
necessary. but there is data in acc.
Now i show you my ser.cfg. 
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"

modparam("auth_db|uri_db|usrloc|acc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("usrloc", "db_mode", 1)
modparam("rr", "enable_full_lr", 1)
modparam("acc", "db_flag", 1)

# Record Route Section
        # testing from
zhu-----------------------------------------------------------------
         if (method=="INVITE" || method=="ACK") {
           log (1, "%method - INVITE or ACK MESSAGE RECEIVED - START
ACCOUNTING\n");
           setflag(1);
          #  record_route();
        };
        if (method=="BYE" || method=="CANCEL") {
                log (1, "%method  - STOP ACCOUNTING\n");
                setflag(1);
            #    record_route();
        };
        # end of testing --------------------------------------------

        if (method!="REGISTER") {
                record_route();
                setflag(2);
        };

this is data section received from acc table of mysql:

| 333 <sip:333 at 192.168.1.26:5061>;tag=249979601  |
<sip:800 at 192.168.1.26>;tag=1273583692 | 200
     | INVITE     | sip:800 at 192.168.1.188:5061 |
sip:800 at 192.168.1.188:5061 | sip:333 at 192.168.1.26:5061 |
sip:800 at 192.168.1.26 |
4E916DD5-2141-3B23-08CC-6F2CEA3B405B at 192.168.1.26 | 333      |
192.168.1.26 | 249979601  | 1273583692 | 2005-07-28 01:50:01 |
20050728095001 | 0              | 0
             |
| 333 <sip:333 at 192.168.1.26:5061>;tag=249979601  |
<sip:800 at 192.168.1.26>;tag=1273583692 | 200
     | ACK        | sip:800 at 192.168.1.188:5061 |
sip:800 at 192.168.1.188:5061 | sip:333 at 192.168.1.26:5061 |
sip:800 at 192.168.1.26 |
4E916DD5-2141-3B23-08CC-6F2CEA3B405B at 192.168.1.26 | 333      |
192.168.1.26 | 249979601  | 1273583692 | 2005-07-28 01:50:01 |
20050728095001 | 0              | 0
             |
| 333 <sip:333 at 192.168.1.26:5061>;tag=249979601  |
<sip:800 at 192.168.1.26>;tag=1273583692 | 200
     | BYE        | sip:800 at 192.168.1.188:5061 |
sip:800 at 192.168.1.188:5061 | sip:333 at 192.168.1.26:5061 |
sip:800 at 192.168.1.26 |
4E916DD5-2141-3B23-08CC-6F2CEA3B405B at 192.168.1.26 | 333      |
192.168.1.26 | 249979601  | 1273583692 | 2005-07-28 01:50:03 |
20050728095003 | 0              | 0
             |
try it!




More information about the sr-users mailing list