anchor.diff:  	TS = calendar:datetime_to_gregorian_seconds(calendar:local_time()),
   	Password = ocs:generate_password(),
   	Chars = [{validity, erlang:system_time(?MILLISECOND) + 2592000000}],
  -	RemAmount = 100,
  -	Buckets = [#bucket{units = cents, remain_amount = RemAmount,
  +	StartingAmount = UnitPrice,
  +	Buckets = [#bucket{units = cents, remain_amount = StartingAmount,
   		start_date = erlang:system_time(?MILLISECOND),
   		termination_date = erlang:system_time(?MILLISECOND) + 2592000000}],
   	SessionId1 = [{'Session-Id', list_to_binary(ocs:generate_password())}],
   	ServiceType = <<"32251@3gpp.org">>,
   	{ok, _} = ocs:add_subscriber(SubscriberID, Password, ProdID, Chars, Buckets),
   	{ok, _, _} = ocs_rating:rate(diameter, ServiceType, SubscriberID, TS,
  -			undefined, undefined, initial, [], [{octets, PackageSize}], SessionId1),
  +			undefined, undefined, initial, [], [{octets, UnitSize}], SessionId1),
   	{ok, #subscriber{buckets = RatedBuckets1}} = ocs:find_subscriber(SubscriberID),
   	#bucket{remain_amount = 0, reservations = Reserved1} = lists:keyfind(cents, #bucket.units, RatedBuckets1),
  -	[{_, PackagePrice, SessionId1}] = Reserved1,
  +	[{_, UnitPrice, SessionId1}] = Reserved1,
   	{ok, _, _} = ocs_rating:rate(diameter, ServiceType, SubscriberID,
   			calendar:gregorian_seconds_to_datetime(TS + 60),
   			undefined, undefined, final, [{octets, 0}], [], SessionId1),
   	{ok, #subscriber{buckets = RatedBuckets2}} = ocs:find_subscriber(SubscriberID),
  -	#bucket{remain_amount = PackagePrice, reservations = []} = lists:keyfind(cents, #bucket.units, RatedBuckets2),
  +	#bucket{remain_amount = UnitPrice, reservations = []} = lists:keyfind(cents, #bucket.units, RatedBuckets2),
   	SessionId2 = [{'Session-Id', list_to_binary(ocs:generate_password())}],
   	{ok, _, _} = ocs_rating:rate(diameter, ServiceType, SubscriberID,
   			calendar:gregorian_seconds_to_datetime(TS + 60),
  -			undefined, undefined, initial, [], [{octets, PackageSize}], SessionId2),
  +			undefined, undefined, initial, [], [{octets, UnitSize}], SessionId2),
   	{ok, #subscriber{buckets = RatedBuckets3}} = ocs:find_subscriber(SubscriberID),
   	#bucket{remain_amount = 0, reservations = Reserved2} = lists:keyfind(cents, #bucket.units, RatedBuckets3),
  -	[{_, PackagePrice, SessionId2}] = Reserved2.
  +	[{_, UnitPrice, SessionId2}] = Reserved2.
  +
  +final_voice() ->
  +	[{userdata, [{doc, "Final RADIUS accounting request for voice call"}]}].
  +
  +final_voice(_Config) ->
  +	ProductID = ocs:generate_password(),
  +	UnitPrice = 5,
  +	UnitSize = 60,
  +	ReserveTime = 300,
  +	Price = #price{name = "Calls", type = usage,
  +			units = seconds, size = UnitSize, amount = UnitPrice,
  +			char_value_use = [#char_value_use{name = "radiusReserveTime",
  +			min = 1, max = 1, values = [#char_value{default = true,
  +			units = seconds, value = ReserveTime}]}]},
  +	Product = #product{name = ProductID, price = [Price], specification = "9"},
  +	{ok, _} = ocs:add_product(Product),
  +	SubscriberID = list_to_binary(ocs:generate_identity()),
  +	Password = ocs:generate_password(),
  +	StartingAmount = 305,
  +	Buckets = [#bucket{units = cents, remain_amount = StartingAmount,
  +			start_date = erlang:system_time(?MILLISECOND),
  +			termination_date = erlang:system_time(?MILLISECOND) + 2592000000}],
  +	Characteristics = [{"radiusReserveSessionTime", 3600}],
  +	{ok, _S} = ocs:add_subscriber(SubscriberID,
  +			Password, ProductID, Characteristics, Buckets),
  +	ServiceType = 12,
  +	Timestamp = calendar:local_time(),
  +	CallAddress = ocs:generate_identity(),
  +	AcctSessionId = {?AcctSessionId, list_to_binary(ocs:generate_password())},
  +	NasIp = {?NasIpAddress, "192.168.1.150"},
  +	NasId = {?NasIdentifier, ocs:generate_password()},
  +	Attributes = [NasIp, NasId, AcctSessionId],
  +	{ok, _, _} = ocs_rating:rate(radius, ServiceType, SubscriberID,
  +			Timestamp, CallAddress, originate, initial, [], [], Attributes),
  +	UsedSeconds1 = rand:uniform(ReserveTime),
  +	{ok, _, _} = ocs_rating:rate(radius, ServiceType, SubscriberID,
  +			Timestamp, CallAddress, originate, interim,
  +			[], [{seconds, UsedSeconds1}], Attributes),
  +	UsedSeconds2 = rand:uniform(ReserveTime),
  +	{ok, _, _} = ocs_rating:rate(radius, ServiceType, SubscriberID,
  +			Timestamp, CallAddress, undefined, final,
  +			[{seconds, UsedSeconds1 + UsedSeconds2}], [], Attributes),
  +	{ok, #subscriber{buckets = Buckets1}} = ocs:find_subscriber(SubscriberID),
  +	#bucket{remain_amount = RemainAmount,
  +			reservations = []} = lists:keyfind(cents, #bucket.units, Buckets1),
  +	UsedUnits = case (UsedSeconds1 + UsedSeconds2) rem UnitSize of
  +		0 ->
  +			(UsedSeconds1 + UsedSeconds2) div UnitSize;
  +		_ ->
  +			(UsedSeconds1 + UsedSeconds2) div UnitSize + 1
  +	end,
  +	RemainAmount = StartingAmount - UsedUnits * UnitPrice.
   
   reserve_data() ->
   	[{userdata, [{doc, "Reservation for data session"}]}].
  
positive.code: 
  final_refund(_Config) ->
  	ProdID = ocs:generate_password(),
  	PackagePrice = 100,
  	PackageSize = 1000,
  	Price = #price{name = "overage", type = usage,
  		units = octets, size = PackageSize, amount = PackagePrice},
  	Product = #product{name = ProdID, price = [Price],
  		specification = 4},
  	{ok, _} = ocs:add_product(Product),
  
negative.code: 	interim_debit_and_reserve_insufficient3,
  	interim_debit_and_reserve_insufficient4,
  	interim_out_of_credit_voice,
  	final_remove_session, final_refund, final_voice,
  	reserve_data, reserve_voice, interim_voice, time_of_day,
  	authorize_voice, authorize_voice_with_partial_reservation,
  	authorize_incoming_voice, authorize_outgoing_voice, authorize_default_voice,
  