anchor.diff:  		service :: tuple() | undefined,
   		hss_realm :: string() | undefined,
   		hss_host :: string() | undefined,
  -		nas_host :: string() | undefined,
  -		nas_realm :: string() | undefined,
  -		nas_address :: inet:ip_address() | undefined,
  -		application :: pos_integer() | undefined,
   		request :: #'3gpp_swx_RTR'{},
   		session_id :: string(),
  -		session_index :: string() | undefined,
  +		sessions = [] :: [#session{}] | undefined,
   		from :: {pid(), reference()} | undefined}).
   -type statedata() :: #statedata{}.
   
  
positive.code: %% @@see //stdlib/gen_fsm:StateName/3
  %% @private
  %%
  idle(#'3gpp_swx_RTR'{'User-Name' = [Identity]} = Request,
  		From, #statedata{session_id = SessionId, hss_host = HssHost,
  		hss_realm = HssRealm} = StateData) ->
  	[IMSI | _] = binary:split(Identity, <<$@>>, []),
  	F = fun() ->
  			mnesia:index_read(session, IMSI, #session.imsi)
  	end,
  	case mnesia:transaction(F) of
  		{atomic, [#session{id = AccessSessionId,
  				application = undefined, nas_address = NasAddress}]} ->
  			NewStateData = StateData#statedata{request = Request,
  					session_index = AccessSessionId,
  					imsi = IMSI, identity = Identity,
  					nas_address = NasAddress, from = From},
  			start_radius_disconnect(NewStateData),
  			ResultCode = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  			Reply = response(ResultCode, NewStateData),
  			{stop, shutdown,  Reply, NewStateData};
  		{atomic, [#session{id = AccessSessionId,
  				application = Application, nas_address = undefined,
  				nas_host = NasHost, nas_realm = NasRealm}]} ->
  			NewStateData = StateData#statedata{request = Request,
  					session_index = AccessSessionId,
  					imsi = IMSI, identity = Identity,
  					application = Application, nas_host = NasHost,
  					nas_realm = NasRealm, from = From},
  			send_abort(NewStateData),
  			{next_state, abort, NewStateData, ?TIMEOUT};
  		{atomic, []} ->
  			ResultCode = ?'DIAMETER_BASE_RESULT-CODE_UNKNOWN_SESSION_ID',
  			Reply = response(ResultCode, StateData),
  			{stop, shutdown,  Reply, StateData};
  		{aborted, Reason} ->
  			error_logger:error_report(["Failed user lookup",
  					{hss_host, HssHost}, {hss_realm, HssRealm},
  					{imsi, IMSI}, {identity, Identity},
  					{session, SessionId}, {error, Reason}]),
  			ResultCode = ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  			Reply = response(ResultCode, StateData),
  			{stop, shutdown,  Reply, StateData}
  
negative.code: %%
  init([ServiceName, ServerAddress, ServerPort, ClientAddress,
  		ClientPort, SessionId, OriginHost, OriginRealm,
  		_DestinationHost, _DestinationRealm] = _Args) ->
  	process_flag(trap_exit, true),
  	{ok, idle, #statedata{service = ServiceName, session_id = SessionId,
  			server_address = ServerAddress, server_port = ServerPort,
  			client_address = ClientAddress, client_port = ClientPort,
  			origin_host = OriginHost, origin_realm = OriginRealm}}.
  
  -spec idle(Event, From, StateData) -> Result
  	when
  