anchor.diff:  	FilteredPrices1 = lists:filter(F, Prices),
   	case filter_prices_tod(Timestamp, FilteredPrices1) of
   		[Price | _] ->
  -			authorize4(Protocol, ServiceType, Subscriber,
  -					Price, SessionAttributes, Reserve);
  +			authorize4(Protocol, ServiceType, Service,
  +					Buckets, Price, SessionAttributes, Reserve);
   		_ ->
  -			authorize5(Subscriber, ServiceType, SessionAttributes, Attributes)
  +			authorize5(Service, Buckets, ServiceType, SessionAttributes, Attributes)
   	end;
   authorize2(_Protocol, ServiceType,
  -		#service{attributes = Attributes} = Subscriber, _Offer,
  +		#service{attributes = Attributes} = Service, Buckets, _Offer,
   		_Timestamp, _Address, _Direction, SessionAttributes, _Reserve) ->
  -	authorize5(Subscriber, ServiceType, SessionAttributes, Attributes).
  -%% @hidden
  -authorize3(Protocol, ServiceType, Subscriber, Address,
  +	authorize5(Service, Buckets, ServiceType, SessionAttributes, Attributes).
  +%% @hidden
  +authorize3(Protocol, ServiceType, Service, Buckets, Address,
   		#price{type = tariff, char_value_use = CharValueUse} = Price,
   		SessionAttributes, Reserve) ->
   	case lists:keyfind("destPrefixTariffTable", #char_value_use.name, CharValueUse) of
  
positive.code: 	end,
  	case lists:any(F, Buckets) of
  		true ->
  			authorize6(Subscriber, SessionAttributes, Attributes);
  		false ->
  			{unauthorized, out_of_credit, ExistingAttr}
  	end.
  %% @hidden
  authorize6(#service{multisession = false, session_attributes = []}
  		= Subscriber, SessionAttributes, Attributes) ->
  	NewSessionAttributes = {erlang:system_time(?MILLISECOND),
  			get_session_id(SessionAttributes)},
  	Subscriber1 = Subscriber#service{session_attributes =
  		[NewSessionAttributes], disconnect = false},
  	ok = mnesia:write(Subscriber1),
  	{authorized, Subscriber1, Attributes, []};
  authorize6(#service{multisession = false, session_attributes
  		= ExistingAttr} = Subscriber, SessionAttributes, Attributes) ->
  	NewSessionAttributes = {erlang:system_time(?MILLISECOND),
  			get_session_id(SessionAttributes)},
  	Subscriber1 = Subscriber#service{session_attributes =
  		[NewSessionAttributes], disconnect = false},
  	ok = mnesia:write(Subscriber1),
  	{authorized, Subscriber1, Attributes, ExistingAttr};
  authorize6(#service{multisession = true, session_attributes
  		= ExistingAttr} = Subscriber, SessionAttributes, Attributes) ->
  	NewSessionAttributes = {erlang:system_time(?MILLISECOND),
  			get_session_id(SessionAttributes)},
  	Subscriber1 = Subscriber#service{session_attributes =
  		[NewSessionAttributes | ExistingAttr], disconnect = false},
  	ok = mnesia:write(Subscriber1),
  	{authorized, Subscriber1, Attributes, ExistingAttr}.
  
  -spec session_attributes(Attributes) -> SessionAttributes
  	when
  
negative.code: 	FilteredPrices2 = filter_prices_tod(Timestamp, FilteredPrices1),
  	case filter_prices_dir(Direction, FilteredPrices2) of
  		[Price | _] ->
  			authorize3(Protocol, ServiceType, Service, Buckets, Address,
  					Price, SessionAttributes, Reserve);
  		_ ->
  			authorize5(Service, Buckets, ServiceType, SessionAttributes, Attributes)
  	end;
  authorize2(radius = Protocol, ServiceType,
  		#service{attributes = Attributes} = Service, Buckets,
  		#offer{specification = ProdSpec, price = Prices}, Timestamp,
  		_Address, _Direction, SessionAttributes, Reserve) when (Reserve > 0)
  		and ((ProdSpec == "8") orelse (ProdSpec == "4")) ->
  	F = fun(#price{type = usage, units = seconds}) ->
  				true;
  