[OpenSIPS-Users] Changes in ACC Modules for 1.5?

Raúl Alexis Betancor Santana rabs at dimension-virtual.com
Tue Mar 31 01:35:03 CEST 2009


On Monday 30 March 2009 21:34:29 Brett Nemeroff wrote:
> Hello All,
> I'm going to reply to my own message. I'm not sure if the upgrade actually
> had anything to do with this, but I suspect it did..
>
> I log everything, failed, missed, acked, etc into one acc table. I was
> setting the acc flag right at the very very top of my script to just catch
> everything.
>
> Well this worked great in 1.4, but in 1.5, it seems that failed
> transactions were getting skipped...
>
> I always had the failed_transaction_flag defined, but I only set that flag
> in my failure route. For some reason, I wasn't getting failed transactions
> ever.
>
> It's also notable that I used the carrierroute function, with only one
> valid route, the secondard route (domain) had a probability of 0 (ie:
> disabled). That may have contributed to this?
>
> Anyway, I set the failed transaction flag at the top of the script as well,
> and it's working how I had expected. Not sure if something else broke when
> I did that, but my typical call flows seem to be logged properly now.

AFAIK, it's a very bad idea to change flag status inside failure_route, 
branch_route or reply_route. I suggest you to do it on route[] blocks, and 
call it from failure_route.

For example, instead of something like:

failure_route[1]
{
  ....
  if(....)
    {
      setflag(15);
     ....
}

Just do:

route(XX):
{
  setflag(15);
}

...

failure_route[1]:
{
  ...
  if(...)
    {
      route(XX);
      ...
    }
...
}

-- 
Raúl Alexis Betancor Santana
Dimensión Virtual



More information about the Users mailing list