anchor.diff:  				error_logger:error_report(["Rating Error",
   						{module, ?MODULE}, {error, Reason},
   						{origin_host, OHost}, {origin_realm, ORealm},
  -						{type, final}, {subscriber, Subscriber},
  +						{type, initial}, {subscriber, Subscriber},
   						{address, Address}, {direction, Direction},
  -						{used, DebitAmount}]),
  -				Reply = diameter_error(SId, ?'DIAMETER_CC_APP_RESULT-CODE_RATING_FAILED',
  +						{amounts, Amounts}]),
  +				Reply = diameter_error(SessionId,
  +						?'DIAMETER_CC_APP_RESULT-CODE_RATING_FAILED',
   						OHost, ORealm, RequestType, RequestNum),
   				ok = ocs_log:acct_log(diameter, Server,
   						accounting_event_type(RequestType), Request, Reply, undefined),
  
positive.code: 			error_logger:warning_report(["Unable to process DIAMETER request",
  					{origin_host, OHost}, {origin_realm, ORealm},
  					{request, Request}, {error, Reason1}]),
  			diameter_error(SId, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost,
  					ORealm, RequestType, RequestNum)
  	end;
  process_request1(?'3GPP_CC-REQUEST-TYPE_TERMINATION_REQUEST' = RequestType,
  		#'3gpp_ro_CCR'{'Multiple-Services-Credit-Control' = []} = Request,
  		SId, RequestNum, _Subscriber, OHost, _DHost,
  		ORealm, _DRealm, IpAddress, Port) ->
  	Reply = diameter_answer(SId, [], [], undefined,
  			?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			OHost, ORealm, RequestType, RequestNum),
  	ok = ocs_log:acct_log(diameter, {IpAddress, Port},
  			accounting_event_type(RequestType), Request, Reply, undefined),
  	Reply.
  
  -spec diameter_answer(SessionId, ServiceIdentifier, RatingGroup, GrantedUnits,
  		ResultCode, OriginHost, OriginRealm, RequestType, RequestNum) -> Result
  			when
  				SessionId :: string(),
  				ServiceIdentifier :: [non_neg_integer()],
  				RatingGroup :: [non_neg_integer()],
  				GrantedUnits :: undefined | #'3gpp_ro_Granted-Service-Unit'{},
  				ResultCode :: integer(),
  				OriginHost :: string(),
  				OriginRealm :: string(),
  				RequestType :: integer(),
  				RequestNum :: integer(),
  				Result :: #'3gpp_ro_CCA'{}.
  %% @doc Build CCA response.
  %% @hidden
  diameter_answer(SId, _ServiceIdentifier, _RatingGroup, undefined,
  		ResultCode, OHost, ORealm, RequestType, RequestNum) ->
  	#'3gpp_ro_CCA'{'Session-Id' = SId, 'Result-Code' = ResultCode,
  			'Origin-Host' = OHost, 'Origin-Realm' = ORealm,
  			'Auth-Application-Id' = ?RO_APPLICATION_ID, 'CC-Request-Type' = RequestType,
  			'CC-Request-Number' = RequestNum};
  diameter_answer(SId, ServiceIdentifier, RatingGroup, GrantedUnits,
  		ResultCode, OHost, ORealm, RequestType, RequestNum) ->
  	MultiServices_CC = #'3gpp_ro_Multiple-Services-Credit-Control'{
  			'Service-Identifier' = ServiceIdentifier,
  			'Result-Code' = [ResultCode],
  			'Rating-Group' = RatingGroup,
  			'Granted-Service-Unit' = [GrantedUnits]},
  	#'3gpp_ro_CCA'{'Session-Id' = SId, 'Result-Code' = ResultCode,
  			'Origin-Host' = OHost, 'Origin-Realm' = ORealm,
  			'Auth-Application-Id' = ?RO_APPLICATION_ID, 'CC-Request-Type' = RequestType,
  			'CC-Request-Number' = RequestNum,
  			'Multiple-Services-Credit-Control' = [MultiServices_CC]}.
  
  -spec diameter_error(SessionId, ResultCode, OriginHost,
  		OriginRealm, RequestType, RequestNum) -> Reply
  	when
  		SessionId :: string(),
  		ResultCode :: integer(),
  		OriginHost :: string(),
  		OriginRealm :: string(),
  		RequestType :: integer(),
  
negative.code: -include("diameter_gen_3gpp_ro_application.hrl").
  -include("diameter_gen_cc_application_rfc4006.hrl").
  -include("ocs.hrl").
  -include("ocs_log.hrl").
  
  -record(state, {}).
  
  