anchor.diff:  	end,
   	lists:filter(F, Attributes).
   
  +%% @hidden
  +start_disconnect([SessionAttributes], #statedata{protocol = radius,
  +		subscriber = SubscriberId, client_address = Address, client_port = ListenPort,
  +		shared_secret = Secret, session_id = SessionID}) ->
  +	case pg2:get_closest_pid(ocs_radius_acct_port_sup) of
  +		{error, Reason} ->
  +			error_logger:error_report(["Failed to initiate session disconnect function",
  +					{module, ?MODULE}, {subscriber, SubscriberId}, {address, Address},
  +					{session, SessionID}, {error, Reason}]);
  +		DiscSup ->
  +			try
  +				NAS = case {radius_attributes:find(?NasIpAddress, SessionAttributes),
  +							radius_attributes:find(?NasIdentifier, SessionAttributes)} of
  +					{{_, IP}, {error, _}} ->
  +						IP;
  +					{_, {ok, ID}} ->
  +						ID
  +				end,
  +				AcctSessionID = case radius_attributes:find(?AcctSessionId, SessionAttributes) of
  +					{ok, ASI} ->
  +						ASI;
  +					{error, _} ->
  +						undefined
  +				end,
  +				DiscArgs = [Address, NAS, SubscriberId, AcctSessionID, Secret,
  +						ListenPort, SessionAttributes, 1],
  +				StartArgs = [DiscArgs, []],
  +				case supervisor:start_child(DiscSup, StartArgs) of
  +					{ok, _DiscFsm} ->
  +						ok;
  +					{error, Reason} ->
  +						error_logger:error_report(["Failed to initiate session disconnect function",
  +								{module, ?MODULE}, {subscriber, SubscriberId}, {nas, NAS},
  +								{address, Address}, {session, SessionID}, {error, Reason}])
  +				end
  +			catch
  +				_:R ->
  +					error_logger:error_report(["Failed to initiate session disconnect function",
  +							{module, ?MODULE}, {subscriber, SubscriberId}, {address, Address},
  +							{session, SessionID}, {error, R}])
  +			end
  +	end;
  +start_disconnect(_, #statedata{protocol = diameter, session_id = SessionID,
  +		origin_host = OHost, origin_realm = ORealm, dest_host = DHost, dest_realm = DRealm,
  +		subscriber = SubscriberId}) ->
  +	case pg2:get_closest_pid(ocs_diamter_acct_port_sup) of
  +		{error, Reason} ->
  +			error_logger:error_report(["Failed to initiate session disconnect function",
  +					{module, ?MODULE}, {subscriber, SubscriberId}, {origin_host, OHost},
  +					{origin_realm, ORealm}, {session, SessionID}, {error, Reason}]);
  +		DiscSup ->
  +			try
  +				Svc = ocs_diameter_acct_service,
  +				Alias = ocs_diameter_base_application,
  +				AppId = ?CC_APPLICATION_ID,
  +				DiscArgs = [Svc, Alias, SessionID, OHost, DHost, ORealm, DRealm, AppId],
  +				StartArgs = [DiscArgs, []],
  +				case supervisor:start_child(DiscSup, StartArgs) of
  +					{ok, _DiscFsm} ->
  +						ok;
  +					{error, Reason} ->
  +						error_logger:error_report(["Failed to initiate session disconnect function",
  +								{module, ?MODULE}, {subscriber, SubscriberId}, {origin_host, OHost},
  +								{origin_realm, ORealm}, {session, SessionID}, {error, Reason}])
  +				end
  +			catch
  +				_:R ->
  +				error_logger:error_report(["Failed to initiate session disconnect function",
  +						{module, ?MODULE}, {subscriber, SubscriberId}, {origin_host, OHost},
  +						{origin_realm, ORealm}, {session, SessionID}, {error, R}])
  +			end
  +	end;
  +start_disconnect(_, _) ->
  +	ok.
  
positive.code: %% @see //stdlib/gen_fsm:handle_info/3
  %% @private
  %%
  handle_info({'EXIT', _Fsm, {shutdown, _SessionID}}, StateName, StateData) ->
  	StateName(disconnected, StateData).
  
  -spec terminate(Reason, StateName, StateData) -> any()
  	when
  
negative.code: handle_diameter1(#subscriber{session_attributes = [], multisession = MultiSession}, StateData) ->
  	NewStateData = StateData#statedata{multisession = MultiSession},
  	handle_diameter2(NewStateData);
  handle_diameter1(#subscriber{session_attributes = SessionAttributes,
  		multisession = false}, StateData) ->
  	NewStateData = StateData#statedata{multisession = false},
  	start_disconnect(SessionAttributes, NewStateData),
  	handle_diameter2(NewStateData).
  %% @hidden
  handle_diameter2(#statedata{protocol = diameter, session_id = SessionID,
  		server_address = ServerAddress, server_port = ServerPort, app_id = AppId,
  