anchor.diff:  	end,
   	case mnesia:transaction(F) of
   		{atomic, ok} ->
  -			send_answer(SId, Subscriber, Balance, ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  +			send_answer(Request, SId, Subscriber, Balance, ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
   					OHost, ORealm, ?CC_APPLICATION_ID, RequestType,
   					RequestNum, State);
   		{aborted, Reason} ->
  
positive.code: 			'Auth-Application-Id' = AuthAppId, 'CC-Request-Type' = RequestType,
  			'CC-Request-Number' = RequestNum, 'Granted-Service-Unit' = GrantedUnits},
  	Server = {Address, Port},
  	ok = ocs_log:acct_log(diameter, Server, OHost, ORealm, accounting_event_type(RequestType),
  			Subscriber, Balance, ResultCode),
  	{reply, Reply, State}.
  
  -spec send_error(SessionId, Subscriber, Balance, ResultCode, OriginHost, OriginRealm,
  		AuthAppId, RequestType, RequestNum, State) -> Result
  			when
  				SessionId :: string(),
  				Subscriber :: undefined | string() | binary(),
  				Balance :: undefined | integer(),
  
negative.code: 			{ok, Password, _, Balance, true} ->
  				case ocs:authorize(Subscriber, Password) of
  					{ok, _, _} ->
  						request1(RequestType, Request, SId, RequestNum, Subscriber,
  								Balance, OHost, ORealm, State);
  					{error, _} ->
  						send_error(Request, SId, Subscriber, Balance, ?'DIAMETER_BASE_RESULT-CODE_AUTHORIZATION_REJECTED',
  								OHost, ORealm, ?CC_APPLICATION_ID, RequestType, RequestNum, State)
  				end;
  			{error, _} ->
  				send_error(Request, SId, undefined, undefined, ?'DIAMETER_BASE_RESULT-CODE_AUTHORIZATION_REJECTED',
  					OHost, ORealm, ?CC_APPLICATION_ID, RequestType,
  						RequestNum, State)
  		end
  	catch
  		_:_ ->
  			send_error(Request, SId, undefined, undefined,
  					?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY', OHost, ORealm,
  					?CC_APPLICATION_ID, RequestType, RequestNum, State)
  	end.
  
  %% @hidden
  request1(?'DIAMETER_CC_APP_CC-REQUEST-TYPE_INITIAL_REQUEST' = RequestType,
  		Request, SId, RequestNum, Subscriber, Balance, OHost, ORealm, State) ->
  	send_answer(Request, SId, Subscriber, Balance, ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			OHost, ORealm, ?CC_APPLICATION_ID, RequestType,
  			RequestNum, State);
  request1(?'DIAMETER_CC_APP_CC-REQUEST-TYPE_UPDATE_REQUEST' = RequestType,
  