anchor.diff:  					32260 ->
   						{ok, JSON} = post_request_ecur(SubscriberIds, SvcContextId,
   								SessionId, MSCC1, undefined, Destination, {initial, a}, PLA),
  -						{ok, JSON, PLA, MSCC2};
  -					_ ->
  -						{error, invalid_context_id}
  +						{ok, JSON, PLA, MSCC2}
   				end;
   			{error, Reason} ->
   				{error, Reason}
  +		end,
  +		case RfResponse of
  +			{ok, JSON1, PLA1, MSCC3} ->
  +				{struct, RatedStruct} = mochijson:decode(JSON1),
  +				{_, {_, ServiceElements}} = lists:keyfind("serviceRating", 1, RatedStruct),
  +				{ServiceRating, _} = map_service_rating(ServiceElements, SessionId),
  +				case charge(Subscriber, ServiceRating, PLA1, SessionId, initial) of
  +					{ok, NewMSCC1, ResultCode1} ->
  +						Container = build_container(MSCC1),
  +						NewMSCC3 = build_mscc(NewMSCC1 ++ MSCC3, Container),
  +						ok = insert_ref(SessionId, ServiceRating),
  +						Reply = diameter_answer(SessionId, NewMSCC3, ResultCode1,
  +								OHost, ORealm, RequestType, RequestNum),
  +						ok = ocs_log:acct_log(diameter, Server,
  +								accounting_event_type(RequestType), Request, Reply, undefined),
  +						Reply;
  +					{error, Reason2} ->
  +						error_logger:error_report(["Rating Error",
  +								{module, ?MODULE}, {error, Reason2},
  +								{origin_host, OHost}, {origin_realm, ORealm},
  +								{type, accounting_event_type(RequestType)},
  +								{subscriber, SubscriberIds}, {address, Address},
  +								{direction, Direction}, {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),
  +						Reply
  +				end;
  +			{ok, MSCC3, ResultCode1} ->
  +				Container = build_container(MSCC1),
  +				NewMSCC3 = build_mscc(MSCC3, Container),
  +				Reply = diameter_answer(SessionId, NewMSCC3, ResultCode1,
  +						OHost, ORealm, RequestType, RequestNum),
  +				ok = ocs_log:acct_log(diameter, Server,
  +						accounting_event_type(RequestType), Request, Reply, undefined),
  +				Reply;
  +			{error, Reason2} ->
  +				error_logger:error_report(["Rating Error",
  +						{module, ?MODULE}, {error, Reason2},
  +						{origin_host, OHost}, {origin_realm, ORealm},
  +						{type, accounting_event_type(RequestType)},
  +						{subscriber, Subscriber}, {address, Address},
  +						{direction, Direction}, {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),
  +				Reply
   		end
  -	of
  -		{ok, JSON1, PLA1, MSCC3} ->
  -			{struct, RatedStruct} = mochijson:decode(JSON1),
  -			{_, {_, ServiceElements}} = lists:keyfind("serviceRating", 1, RatedStruct),
  -			{ServiceRating, _} = map_service_rating(ServiceElements, SessionId),
  -			case charge(Subscriber, ServiceRating, PLA1, SessionId, initial) of
  -				{ok, NewMSCC1, ResultCode1} ->
  -					Container = build_container(MSCC1),
  -					NewMSCC3 = build_mscc(NewMSCC1 ++ MSCC3, Container),
  -					ok = insert_ref(SessionId, ServiceRating),
  -					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,
  
positive.code: 		'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) ->
  	try
  		Location = get_service_location(ServiceInformation),
  		Destination = get_destination(ServiceInformation),
  		case post_request_iec(SubscriberIds, SvcContextId,
  				SessionId, MSCC, Location, Destination) of
  			{ok, JSON} ->
  				{struct, RatedStruct} = mochijson:decode(JSON),
  
negative.code: 		'Service-Context-Id' = SvcContextId,
  		'Event-Timestamp' = EventTimestamp} = Request, SessionId,
  		RequestNum, [{_, Subscriber} | _], OHost, _DHost, ORealm, _DRealm,
  		IpAddress, Port, _Class) when length(MSCC1) > 0 ->
  	try
  		Server = {IpAddress, Port},
  		{Direction, Address} = direction_address(ServiceInformation),
  		ServiceNetwork = service_network(ServiceInformation),
  		ServiceType = service_type(SvcContextId),
  