[OpenSIPS-Users] help: accounting for REGISTER request

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Feb 20 18:25:38 CET 2009


Hi Yun,

Accounting works only in statefull mode (when using TM to relay or reply 
the request). With the REGISTER request, you do not use the stateful 
support - the "save()" function returns a stateless reply.

Have you considered using the log_acc_request() function to explicitly 
account from script?
          http://www.opensips.org/html/docs/modules/1.4.x/acc.html#id272071

Regards,
Bogdan

Yun Chew wrote:
> Hi,
>
> I am using Openser 1.3.2, and I am not able to account for REGISTER 
> request.   For other requests such as INVITE/BYE are fine.  Here's a 
> snapshot of my config file.  Any help appreciated!
>
> # -- acc params --
> modparam("acc", "db_url", "flatstore:/tmp")
> modparam("acc", "db_flag", 1)
> modparam("acc", "db_missed_flag", 2)
> modparam("acc", "failed_transaction_flag", 1)
> modparam("acc", "report_cancels", 1)
> modparam("acc", "detect_direction", 1)
>
>
> # Including /local/cpwright/SIP/spit/sut/openser/config/route.basic
> # basic 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");
>                 exit;
>         };
>
>         if (msg:len >=  2048 ) {
>                 sl_send_reply("513", "Message too big");
>                 exit;
>         };
>
>         # 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");
>                 if (is_method("BYE|CANCEL")) {
>                         setflag(1);
>                         setflag(2);
>                 }
>         };
>        if (is_method("INVITE")) {
>               setflag(1);
>               setflag(2);
>        }
>
>         if (method=="REGISTER") {
>                 setflag(1);
>                 setflag(2);
>                 route(2);
>                 exit;
>         };
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the Users mailing list