anchor.diff:  					((ServiceType == ?DIAMETERSMS) and ((Spec == "10") orelse (Spec == "11"))))) ->
   			rate2(Protocol, Service, Product, Buckets, Timestamp, Address,
   					Direction, Offer, Flag, DebitAmounts, ReserveAmounts,
  -					State, #rated{product = OfferName},
  +					SessionId, #rated{product = OfferName},
   					ChargingKey, ServiceNetwork);
   		_ ->
   			throw(invalid_service_type)
   	end.
   rate2(Protocol, Service, Product, Buckets, Timestamp, Address, Direction,
   		#offer{specification = ProdSpec, price = Prices} = _Offer,
  -		Flag, DebitAmounts, ReserveAmounts, State, Rated,
  +		Flag, DebitAmounts, ReserveAmounts, SessionId, Rated,
   		ChargingKey, ServiceNetwork)
   		when ProdSpec == "10"; ProdSpec == "11" ->
   	F = fun(#price{type = usage, units = messages}) ->
  
positive.code: 			RoamingTable = roaming_table_prefix(Price),
  			rate3(Protocol, Service, Product, Buckets, Address,
  					Price, Flag, DebitAmounts, ReserveAmounts,
  					State, RoamingTable, Rated,
  					ChargingKey, ServiceNetwork);
  		_ ->
  			throw(price_not_found)
  
negative.code: 							units = Units, product = [ProductId]} | Buckets2],
  					charge3(Service, Product, Buckets4, interim,
  							DebitAmount, {Units, UnitsCharged},
  							{Units, 0}, {Units, 0}, SessionId, Rated, ChargingKey, Buckets)
  			end
  	end;
  charge2(#service{name = ServiceId} = Service, #product{id = ProductId} = Product, Buckets,
  		#price{units = Units, size = UnitSize, amount = UnitPrice},
  		interim, {Units, Damount} = DebitAmount, {Units, Ramount} = ReserveAmount,
  		SessionId, Rated, ChargingKey) ->
  	case update_session(Units, Damount, Ramount,
  			ServiceId, ChargingKey, SessionId, Buckets) of
  		{Damount, UnitsReserved, Buckets2} when UnitsReserved >= Ramount ->
  			charge3(Service, Product, Buckets2, interim, DebitAmount, DebitAmount,
  					ReserveAmount, {Units, UnitsReserved}, SessionId, Rated, ChargingKey, Buckets);
  		{Damount, UnitsReserved, Buckets2} when UnitsReserved < Ramount ->
  			NewReserveUnits = Ramount - UnitsReserved,
  			{UnitReserve, PriceReserve} = price_units(NewReserveUnits,
  