anchor.diff:  		'Requested-Action' = [?'3GPP_RO_REQUESTED-ACTION_DIRECT_DEBITING'],
   		'Service-Information' = ServiceInformation,
   		'Service-Context-Id' = SvcContextId} = Request, SessionId,
  -		RequestNum, SubscriberIds, OHost, _DHost, ORealm, _DRealm,
  -		_IpAddress, _Port, b = _Class) ->
  +		RequestNum, Subscriber, OHost, _DHost, ORealm, _DRealm,
  +		IpAddress, Port, b = _Class) ->
   	try
  +		Server = {IpAddress, Port},
  +		{Direction, Address} = direction_address(ServiceInformation),
   		Location = get_service_location(ServiceInformation),
   		Destination = get_destination(ServiceInformation),
  -		case post_request_iec(SubscriberIds, SvcContextId,
  +		case post_request_iec(Subscriber, SvcContextId,
   				SessionId, [], Location, Destination) of
   			{ok, JSON} ->
   				{struct, _RatedStruct} = mochijson:decode(JSON),
  -				diameter_answer(SessionId, [], ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  -						OHost, ORealm, RequestType, RequestNum);
  -			{error, ReasonCode} ->
  +				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;
  +			{error, Reason} ->
   				error_logger:error_report(["Rating Error",
  -						{module, ?MODULE}, {error, ReasonCode}]),
  +						{module, ?MODULE}, {error, Reason},
  +						{origin_host, OHost}, {origin_realm, ORealm},
  +						{type, accounting_event_type(RequestType)},
  +						{subscriber, Subscriber}, {address, Address},
  +						{direction, Direction}, {amounts, []}]),
   				ok = remove_ref(SessionId),
  -				diameter_error(SessionId, ReasonCode,
  -						OHost, ORealm, RequestType, RequestNum)
  +				Reply = diameter_error(SessionId, Reason,
  +						OHost, ORealm, RequestType, RequestNum),
  +				ok = ocs_log:acct_log(diameter, Server,
  +						accounting_event_type(RequestType), Request, Reply, undefined),
  +				Reply
   		end
   	catch
  -		_:Reason1 ->
  +		?CATCH_STACK ->
  +			?SET_STACK,
   			error_logger:warning_report(["Unable to process DIAMETER request",
   					{origin_host, OHost}, {origin_realm, ORealm},
  -					{request, Request}, {error, Reason1}, {stack, erlang:get_stacktrace()}]),
  +					{request, Request}, {error, Reason1}, {stack, StackTrace}]),
   			diameter_error(SessionId, ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
   					OHost, ORealm, RequestType, RequestNum)
   	end;
  
positive.code: 			_ ->
  				calendar:universal_time()
  		end,
  		case rate(ServiceType, ServiceNetwork, Subscriber, Timestamp,
  				Address, Direction, interim, SessionId, get_mscc(MSCC1)) of
  			{{MSCC2, ResultCode}, []} ->
  				{ok, MSCC2, ResultCode};
  			{{MSCC2, _ResultCode}, PLA} ->
  				{ok, get_ref(SessionId), PLA, MSCC2};
  			{error, Reason} ->
  				{error, Reason}
  		end
  	of
  		{ok, ServiceRating, PLA1, MSCC3} ->
  			case charge(Subscriber, ServiceRating, PLA1, SessionId, interim) of
  				{ok, NewMSCC1, ResultCode1} ->
  					Container = build_container(MSCC1),
  					NewMSCC3 = build_mscc(NewMSCC1 ++ MSCC3, Container),
  					diameter_answer(SessionId, NewMSCC3, ResultCode1,
  							OHost, ORealm, RequestType, RequestNum);
  				{error, Reason1} ->
  					error_logger:error_report(["Rating Error",
  							{module, ?MODULE}, {error, Reason1}]),
  					diameter_error(SessionId,
  							?'DIAMETER_CC_APP_RESULT-CODE_RATING_FAILED',
  							OHost, ORealm, RequestType, RequestNum)
  			end;
  		{ok, MSCC3, ResultCode1} ->
  			Container = build_container(MSCC1),
  			NewMSCC3 = build_mscc(MSCC3, Container),
  			diameter_answer(SessionId, NewMSCC3, ResultCode1,
  					OHost, ORealm, RequestType, RequestNum);
  		{error, Reason1} ->
  			error_logger:error_report(["Rating Error",
  					{module, ?MODULE}, {error, Reason1}]),
  			diameter_error(SessionId,
  					?'DIAMETER_CC_APP_RESULT-CODE_RATING_FAILED',
  					OHost, ORealm, RequestType, RequestNum)
  	catch
  		?CATCH_STACK ->
  			?SET_STACK,
  
negative.code: 		'Requested-Action' = [?'3GPP_RO_REQUESTED-ACTION_DIRECT_DEBITING'],
  		'Service-Information' = ServiceInformation,
  		'Service-Context-Id' = SvcContextId} = Request, SessionId,
  		RequestNum, Subscriber, OHost, _DHost, ORealm, _DRealm,
  		IpAddress, Port, _Class) ->
  	try
  		Server = {IpAddress, Port},
  		{Direction, Address} = direction_address(ServiceInformation),
  		Location = get_service_location(ServiceInformation),
  		Destination = get_destination(ServiceInformation),
  		case post_request_iec(Subscriber, SvcContextId,
  				SessionId, [], Location, Destination) of
  			{ok, JSON} ->
  				{struct, _RatedStruct} = mochijson:decode(JSON),
  				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;
  			{error, Reason} ->
  				error_logger:error_report(["Rating Error",
  						{module, ?MODULE}, {error, Reason},
  						{origin_host, OHost}, {origin_realm, ORealm},
  						{type, accounting_event_type(RequestType)},
  						{subscriber, Subscriber}, {address, Address},
  						{direction, Direction}, {amounts, []}]),
  				ok = remove_ref(SessionId),
  				Reply = diameter_error(SessionId, Reason,
  						OHost, ORealm, RequestType, RequestNum),
  				ok = ocs_log:acct_log(diameter, Server,
  						accounting_event_type(RequestType), Request, Reply, undefined),
  				Reply
  		end
  	catch
  		?CATCH_STACK ->
  