[Serusers] re: Problems with accounting - can't get stop records

jaime.gil at orange.co.uk jaime.gil at orange.co.uk
Tue Sep 30 09:39:49 CEST 2003


Steven,

This was the config used:

#
# $Id: ser.cfg,v 1.21 2003/06/04 13:47:36 jiri Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

debug=3         # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes    # (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 ----------------------------------

# Uncomment this if you want to use SQL database
loadmodule "./modules/mysql/mysql.so"

loadmodule "./modules/sl/sl.so"
loadmodule "./modules/tm/tm.so"
loadmodule "./modules/rr/rr.so"
loadmodule "./modules/maxfwd/maxfwd.so"
loadmodule "./modules/usrloc/usrloc.so"
loadmodule "./modules/registrar/registrar.so"
loadmodule "./modules/uri/uri.so"

# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "./modules/auth/auth.so"
loadmodule "./modules/auth_db/auth_db.so"

loadmodule "modules/acc/acc.so"

loadmodule "./modules/auth_radius/auth_radius.so"

# ----------------- setting module-specific parameters ---------------

# -- usrloc params --

modparam("usrloc", "db_mode",   2)


modparam("auth_radius", "radius_config",
"/usr/local/etc/radiusclient/radiusclient.conf")

# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)

modparam("acc", "log_level", 1)
modparam("acc", "radius_flag", 1)


# -------------------------  request routing logic -------------------

alias=xxxxx.orange.co.uk


# 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 (len_gt( max_len )) {
          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
     record_route();
     # loose-route processing
#    if (loose_route()) {
#         t_relay();
#         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 (method=="REGISTER") {

          log(1, "REGISTER: Authenticating user\n");

          if (!radius_www_authorize("")) {
               log(1, "REGISTER: challenging user\n");
               www_challenge("", "0");
               break;
          };
          save("location");
          break;
     };


     if (method=="INVITE") {

          log(1, "INVITE\n");

          setflag(1); /* set for accounting (the same value as in log_flag!) */
     };

     if (method=="MESSAGE") {
          log(1, "MESSAGE\n");
          setflag(1); /* set for accounting (the same value as in log_flag!) */
     };

     if (method=="BYE" || method=="CANCEL") {
          log (1, "BYE or CANCEL\n");
          setflag(1);
     };

     # native SIP destinations are handled using our USRLOC DB
     if (!lookup("location")) {
          sl_send_reply("404", "Not Found");
          break;
     };
     if (!t_relay()) {
          sl_reply_error();
          break;
     };


}







"Steven R. Bunin" <steve at solaas.com> on 29/09/2003 19:01:55




To:   Jaime GIL/EN/HTLUK at HTLUK
cc:   serusers at lists.iptel.org


Subject:  re: Problems with accounting - can't get stop records



Jaime,

Thanks for the resposne.. I have my loose_route shut off. I think the problem
may
have to do with an error message I am receiving which is "ERROR: reply cannot be
parsed" from my stderr.

Do you have a working version of a script that works with 0.8.11 and gets stop
records I could look at? It should give me a hand.. I know I am so close to
solving
this but it is a struggle.

Steve

jaime.gil at orange.co.uk wrote:

> Steven,
>
> I remember having the same problem. In my case, the problem seemed to be in
the
> loose_route processing. I don't know what it has to do with the accounting
> module, but commenting out this part made the trick in my case.
>
> Jaime
>
> "Steven R. Bunin" <steve at solaas.com> on 26/09/2003 17:11:41
>
> To:   serusers at lists.iptel.org
> cc:    (bcc: Jaime GIL/EN/HTLUK)
>
> Subject:  [Serusers] Re: Serusers Digest, Vol 5, Issue 63
>
> Hi all,
>
> I have successfully gotten radius authentication working and I started getting
> Radius Start records for accounting but I am not sure what I am doing wrong in
> regards to getting radius Stop records.
>
> Below is the area I believe has the most affect on Radius Acccounting from my
> Log File. Any suggestions would be appreciated and if it would help to see the
> full Config file I will send it as well.
>
>  record_route();
>
>   if (method=="REGISTER") {
>
> # Uncomment this if you want to use digest authentication
>    if (!radius_www_authorize("")) {
>     www_challenge("", "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"){
>  log (1, "BYE or CANCEL\n");
>  setflag(1);
>  };
> if (method=="CANCEL"){
>  log (1, "BYE or CANCEL\n");
>  setflag(1);
>  };
>
> Thanks in advance,
>
> Steve
>
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>   ------------------------------------------------------------------------
>                Name: att1.eml
>    att1.eml    Type: Internet E-Mail Message (message/rfc822)
>            Encoding: base64
>
>   ------------------------------------------------------------------------
>
>
*******************************************************************************
> Important.
> Confidentiality: This communication is intended for the above-named person and
> may be confidential and/or legally privileged. Any opinions expressed in this
> communication are not necessarily those of the company. If it has come to you
> in error you must take no action based on it, nor must you copy or show it to
> anyone; please delete/destroy and inform the sender immediately.
>
> Monitoring/Viruses
> Orange may monitor all incoming and outgoing emails in line with current
> legislation.  Although we have taken steps to ensure that this email and
> attachments are free from any virus, we advise that in keeping with good
> computing practice the recipient should ensure they are actually virus free.
>
> Orange PCS Limited is a subsidiary of Orange SA and is registered in England
No
> 2178917, with its address at St James Court, Great Park Road, Almondsbury
Park,
> Bradley Stoke, Bristol BS32 4QJ.
>
*******************************************************************************

--
Steven R. Bunin - Managing Partner

SOLAAS LLC
10 East 39th Street
Suite 1125
New York, NY 10016
(+001) 212-532-6700
Cellular: 646-739-7000
Fax (+001) 212-532-6776

http://www.solaas.com

--

This e-mail may contain confidential and/or privileged information. If you are
not
the intended recipient (or have received this e-mail in error) please notify the
sender immediately and destroy this e-mail. Any unauthorized copying, disclosure
or
distribution of the material in this e-mail is strictly forbidden.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: att1.eml
Type: application/octet-stream
Size: 5891 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20030930/87233c79/attachment.obj>
-------------- next part --------------

*******************************************************************************
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
*******************************************************************************


More information about the sr-users mailing list