anchor.diff:  						Username
   				end
   		end,
  -		process_request1(RequestType, Request, SId, RequestNum,
  +		process_request1(RequestType, Request, SessionId, RequestNum,
   				Subscriber, OHost, DHost, ORealm, DRealm, IpAddress, Port)
   	catch
   		_:Reason ->
   			error_logger:warning_report(["Unable to process DIAMETER request",
   					{origin_host, OHost}, {origin_realm, ORealm},
   					{request, Request}, {error, Reason}]),
  -			diameter_error(SId, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  +			diameter_error(SessionId, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
   					OHost, ORealm, RequestType, RequestNum)
   	end.
   %% @hidden
   process_request1(?'3GPP_CC-REQUEST-TYPE_INITIAL_REQUEST' = RequestType,
   		#'3gpp_ro_CCR'{'Multiple-Services-Credit-Control' = []} = Request,
  -		SId, RequestNum, Subscriber, OHost, _DHost, ORealm, _DRealm,
  +		SessionId, RequestNum, Subscriber, OHost, _DHost, ORealm, _DRealm,
   		IpAddress, Port) ->
   	try
   		Server = {IpAddress, Port},
   		case mnesia:transaction(fun() -> mnesia:read(service, Subscriber, read) end) of
   			{atomic, [#service{enabled = true}]} ->
  -				Reply = diameter_answer(SId, [], [], undefined,
  +				Reply = diameter_answer(SessionId, [],
   						?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
   						OHost, ORealm, RequestType, RequestNum),
   				ok = ocs_log:acct_log(diameter, Server,
   						accounting_event_type(RequestType), Request, Reply, undefined),
   				Reply;
   			{atomic, [#service{enabled = false}]} ->
  -				Reply = diameter_error(SId, ?'DIAMETER_BASE_RESULT-CODE_AUTHORIZATION_REJECTED',
  +				Reply = diameter_error(SessionId,
  +						?'DIAMETER_BASE_RESULT-CODE_AUTHORIZATION_REJECTED',
   						OHost, ORealm, RequestType, RequestNum),
   				ok = ocs_log:acct_log(diameter, Server,
   						accounting_event_type(RequestType), Request, Reply, undefined),
   				Reply;
   			{atomic, []} ->
  -				Reply = diameter_error(SId, ?'DIAMETER_CC_APP_RESULT-CODE_USER_UNKNOWN',
  +				Reply = diameter_error(SessionId,
  +						?'DIAMETER_CC_APP_RESULT-CODE_USER_UNKNOWN',
   						OHost, ORealm, RequestType, RequestNum),
   				ok = ocs_log:acct_log(diameter, Server,
   						accounting_event_type(RequestType), Request, Reply, undefined),
  
positive.code: %% @private
  process_request(IpAddress, Port,
  		#diameter_caps{origin_host = {OHost, DHost}, origin_realm = {ORealm, DRealm}},
  		#'3gpp_ro_CCR'{'Session-Id' = SId, 'User-Name' = NAISpecUName,
  				'Auth-Application-Id' = ?RO_APPLICATION_ID,
  				'Service-Context-Id' = _SvcContextId,
  				'CC-Request-Type' = RequestType,
  
negative.code: 			error_logger:warning_report(["Unable to process DIAMETER request",
  					{origin_host, OHost}, {origin_realm, ORealm},
  					{request, Request}, {error, Reason1}]),
  			diameter_error(SessionId, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  					OHost, ORealm, RequestType, RequestNum)
  	end;
  process_request1(?'3GPP_CC-REQUEST-TYPE_INITIAL_REQUEST' = RequestType,
  		#'3gpp_ro_CCR'{'Multiple-Services-Credit-Control' = MSCC1,
  		'Service-Information' = ServiceInformation,
  		'Service-Context-Id' = SvcContextId,
  		'Event-Timestamp' = EventTimestamp} = Request, SessionId, RequestNum,
  		Subscriber, OHost, _DHost, ORealm, _DRealm, IpAddress, Port) ->
  	try
  		{Direction, Address} = direction_address(ServiceInformation),
  		ServiceType = service_type(SvcContextId),
  		ServiceNetwork = service_network(ServiceInformation),
  