[Serusers] Radius Accounting

Greger V. Teigre greger at teigre.com
Tue Jul 11 21:14:44 CEST 2006


By making sure that the accounting flag is set also for those messages.
g-)

Caxton wrote:
> Dear Teigre:
>     How can I slove this problem?
>     Thanks.
>  
> Sincerely
> Caxton
>
>  
> 2006/7/11, Greger V. Teigre <greger at teigre.com 
> <mailto:greger at teigre.com>>:
>
>     The BYE is loose routed, thus it will go to route(1).
>     g-)
>
>     Caxton wrote:
>     Hi all:
>      
>         I have installed radius server, and I also configure the
>     "ser.cfg" for the radius accounting.  However, there is a problem
>     confues me.
>        
>         While the sip session have set up, the radiusclient send a
>     Request-Account packet to radius server immediately, than radius
>     server
>         can save the start-up time of the session into database.  But
>     after the session terminated, radiusclient do nothing(it should
>     send a
>         Accounting-Stop packet to radius server)!!  Therefore, I can
>     not have a complete time record.
>      
>         I try to look up the solution in seruser mailing list, but I
>     can not find what I want.  Please help me, thanks.
>      
>         Sincerely
>      
>         Caxton
>      
>     -----ser.cfg-----
>      
>     [cut]
>      
>     # -- acc params --
>     modparam("acc", "radius_config",
>     "/usr/local/etc/radiusclient-ng/radiusclient.conf")
>     modparam("acc", "log_level", 2)
>     modparam("acc", "radius_flag", 1)
>     modparam("acc", "report_ack", 0)
>     # -------------------------  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;
>             };
>             # 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();
>
>             # 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) {
>                     # 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) {
>
>                     if (method=="REGISTER") {
>                            log(1, "REGISTER: Authenticating user\n");
>     # Uncomment this if you want to use digest authentication
>                             if
>     (!www_authorize("pc80.s206.tj.mcu.edu.tw
>     <http://pc80.s206.tj.mcu.edu.tw/>", "subscriber")) {
>                                     log(1, "REGISTER: Chanllenging
>     user\n");
>                                     www_challenge("
>     pc80.s206.tj.mcu.edu.tw <http://pc80.s206.tj.mcu.edu.tw/>", "0");
>                                     break;
>                             };
>                             save("location");
>                             break;
>                     };
>                     if(method=="INVITE") {
>                             log(1, "INVITE\n");
>                             setflag(1);
>                     }
>                     if(method=="MESSAGE") {
>                             log(1, "MESSAGE\n");
>                             setflag(1);
>                     }
>                     if(method=="BYE"||method== "CANCEL") {
>                             log(1, "BYE or CANCEL\n");
>                             setflag(1);
>                     }
>      
>     [cut]
>
>     ------------------------------------------------------------------------
>
>     _______________________________________________
>     Serusers mailing list
>     Serusers at lists.iptel.org <mailto:Serusers at lists.iptel.org>
>     http://lists.iptel.org/mailman/listinfo/serusers
>       
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060711/c5779f0f/attachment.htm>


More information about the sr-users mailing list