anchor.diff:  	{stop, shutdown, StateData};
   register({ok, #'3gpp_swx_SAA'{'Experimental-Result'
   		= [#'3gpp_Experimental-Result'{'Experimental-Result-Code' = ResultCode1}],
  -		'Origin-Host' = Host, 'Origin-Realm' = Realm} = _Answer},
  +		'Origin-Host' = HssHost, 'Origin-Realm' = HssRealm} = _Answer},
   		#statedata{from = Caller, session_id = SessionId,
  +		pgw_host = PgwHost, pgw_realm = PgwRealm,
  +		pgw_id = PGW, pgw_plmn = VPLMN,
   		imsi = IMSI, identity = Identity} = StateData) ->
   	error_logger:error_report(["Unexpected registration result",
  -			{hss_host, Host}, {hss_realm, Realm},
  +			{hss_host, HssHost}, {hss_realm, HssRealm},
  +			{pgw_host, PgwHost}, {pgw_realm, PgwRealm},
  +			{pgw_id, PGW}, {pgw_plmn, VPLMN},
   			{imsi, IMSI}, {identity, Identity},
   			{session, SessionId}, {result, ResultCode1}]),
   	ResultCode1 = ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  
positive.code: 			{next_state, profile, NewStateData, ?TIMEOUT};
  		{aborted, Reason} ->
  			error_logger:error_report(["Failed user lookup",
  					{pgw_host, Host}, {pgw_realm, Realm},
  					{imsi, IMSI}, {identity, Identity},
  					{session, SessionId}, {error, Reason}]),
  			ResultCode = ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  
negative.code: %% @private
  %%
  idle(#'3gpp_s6b_AAR'{'User-Name' = [Identity], 'Session-Id' = SessionId,
  		'Origin-Host' = PgwHost, 'Origin-Realm' = PgwRealm,
  		'Auth-Request-Type' = ?'3GPP_SWX_AUTH-REQUEST-TYPE_AUTHORIZE_ONLY',
  		'MIP6-Agent-Info' = PGW, 'Visited-Network-Identifier' = VPLMN,
  		'Service-Selection' = [APN]} = Request, From, StateData) ->
  	[IMSI | _] = binary:split(Identity, <<$@>>, []),
  	NewStateData = StateData#statedata{from = From, request = Request,
  			identity = Identity, imsi = IMSI,
  			pgw_host = PgwHost, pgw_realm = PgwRealm,
  			pgw_id = PGW, pgw_plmn = VPLMN},
  	F = fun() ->
  			mnesia:index_read(session, IMSI, #session.imsi)
  	end,
  