anchor.diff:  						{origin_host, OHost}]),
   				{Reply, NewState} = generate_diameter_answer(Request, SId, Subscriber,
   						undefined, ?'IETF_RESULT-CODE_CREDIT_LIMIT_REACHED', OHost,
  -						ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +						ORealm, RequestType, RequestNum, State),
   				{reply, Reply, NewState};
   			{disabled, _SessionList} ->
   				{Reply, NewState} = generate_diameter_answer(Request, SId, Subscriber,
   						undefined, ?'IETF_RESULT-CODE_END_USER_SERVICE_DENIED', OHost,
  -						ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +						ORealm, RequestType, RequestNum, State),
   				{reply, Reply, NewState};
   			{error, subscriber_not_found} ->
   				error_logger:warning_report(["diameter accounting subscriber not found",
   						{module, ?MODULE}, {subscriber, Subscriber},
   						{origin_host, OHost}]),
   				{Reply, NewState} = generate_diameter_error(SId, ?'IETF_RESULT-CODE_USER_UNKNOWN',
  -						OHost, ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +						OHost, ORealm, RequestType, RequestNum, State),
   				{reply, Reply, NewState};
   			{error, _Reason} ->
   				{Reply, NewState} = generate_diameter_error(SId, ?'IETF_RESULT-CODE_RATING_FAILED',
  -						OHost, ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +						OHost, ORealm, RequestType, RequestNum, State),
   				{reply, Reply, NewState}
   		end
   	catch
   		_:_Reason1 ->
   			{Reply1, NewState0} = generate_diameter_error(SId,
   					?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost,
  -					ORealm, ?RO_APPLICATION_ID, RequestType, RequestNum, State),
  +					ORealm, RequestType, RequestNum, State),
   			{reply, Reply1, NewState0}
   	end.
   
   -spec generate_diameter_answer(Request, SessionId, Subscriber, GrantedUnits,
  -		ResultCode, OriginHost, OriginRealm, AuthAppId, RequestType, RequestNum,
  +		ResultCode, OriginHost, OriginRealm, RequestType, RequestNum,
   		State) -> Result
   			when
   				Request :: #'3gpp_ro_CCR'{},
  
positive.code: 				ResultCode :: integer(),
  				OriginHost :: string(),
  				OriginRealm :: string(),
  				AuthAppId :: integer(),
  				RequestType :: integer(),
  				RequestNum :: integer(),
  				Result :: {Reply, State},
  
negative.code: 				end,
  				{Reply, NewState} = generate_diameter_answer(Request, SId, Subscriber,
  						GrantedUnits, ?'DIAMETER_BASE_RESULT-CODE_SUCCESS', OHost, ORealm,
  						RequestType, RequestNum, State),
  				{reply, Reply, NewState};
  			{out_of_credit, _SessionList} ->
  				error_logger:warning_report(["out of credit",
  