anchor.diff:  	end,
   	{ok, Subscriber} = radius_attributes:find(?UserName, Attributes),
   	ok = ocs_log:acct_log(radius, {ServerAddress, ServerPort}, stop, Attributes),
  -	Candidates = [{?AcctSessionId, AcctSessionId}, {?NasIdentifier, NasId}, {?NasIpAddress, NasId}],
  +	SessionAttributes = session_attributes(Attributes),
   	DebitAmount = [{octets, UsageOctets}, {seconds, UsageSecs}],
   	Destination = proplists:get_value(?CalledStationId, Attributes, ""),
   	case ocs_rating:rate(radius, Subscriber,
  -			Destination, final, DebitAmount, [], Candidates) of
  +			Destination, final, DebitAmount, [], SessionAttributes) of
   		{out_of_credit, SessionList}  ->
   			gen_server:reply(From, {ok, response(Id, Authenticator, Secret)}),
   			start_disconnect(State, Subscriber, SessionList),
  
positive.code: request1(?AccountingStart, AcctSessionId, Id,
  		Authenticator, Secret, NasId, Address, _AccPort, _ListenPort, Attributes,
  		From, #state{address = ServerAddress, port = ServerPort} = State) ->
  	SessionAttributes = extract_session_attributes(Attributes),
  	{ok, Subscriber} = radius_attributes:find(?UserName, Attributes),
  	Destination = proplists:get_value(?CalledStationId, Attributes, ""),
  	case ocs_rating:rate(radius, Subscriber,
  
negative.code: 	StartArgs = [DiscArgs, []],
  	supervisor:start_child(DiscSup, StartArgs).
  
  -spec session_attributes(Attributes) -> SessionAttributes
  	when
  		Attributes :: radius_attributes:attributes(),
  		SessionAttributes :: radius_attributes:attributes().
  %% @doc Extract RADIUS session related attributes.
  %% @hidden
  session_attributes(Attributes) ->
  	F = fun({?NasIdentifier, _}) ->
  				true;
  			({?NasIpAddress, _}) ->
  				true;
  			({?AcctSessionId, _}) ->
  				true;
  			(_) ->
  				false
  	end,
  	lists:filter(F, Attributes).
  
  