anchor.diff:  					DesRealm, undefined, UserName, "AAAAccountingUsageSpec"}
   	end;
   dia_req_and_res(#'3gpp_ro_RAR'{'Origin-Realm' = OriginRealm,
  -		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  -		#'3gpp_ro_RAA'{'Result-Code' = _ResultCode}) ->
  -	case Request#'3gpp_ro_RAR'.'Origin-Host' of
  +		'Origin-Host' = OriginHost, 'Destination-Realm' = DesRealm,
  +		'User-Name' = UserName}, #'3gpp_ro_RAA'{'Result-Code' = _ResultCode}) ->
  +	case OriginHost of
   		OriginHost1 when is_binary(OriginHost1) ->
   			{"failure", "ro", OriginHost1, OriginHost1, undefined, OriginRealm,
   					DesRealm, undefined, UserName, "AAAAccountingUsageSpec"};
  
positive.code: 	end.
  %% @hidden
  dia_req_and_res(#diameter_nas_app_AAR{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_nas_app_AAA{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#diameter_nas_app_AAR.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "unknown", "nas", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "unknown", "nas", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#diameter_nas_app_AAR{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_nas_app_AAA{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#diameter_nas_app_AAR.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "success", "nas", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "success", "nas", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#diameter_nas_app_AAR{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_nas_app_AAA{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#diameter_nas_app_AAR.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "failure", "nas", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "failure", "nas", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#diameter_eap_app_DER{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_eap_app_DEA{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#diameter_eap_app_DER.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "unknown", "eap", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "unknown", "eap", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#diameter_eap_app_DER{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_eap_app_DEA{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#diameter_eap_app_DER.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "success", "eap", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "success", "eap", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#diameter_eap_app_DER{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#diameter_eap_app_DEA{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#diameter_eap_app_DER.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "failure", "eap", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "failure", "eap", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_DEA'{'Result-Code' = undefined,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port}) ->
  	case Request#'3gpp_sta_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_DEA'{'Result-Code' = ResultCode,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_sta_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_DEA'{'Result-Code' = _ResultCode,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port}) ->
  	case Request#'3gpp_sta_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"end", "failure", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_DEA'{'Result-Code' = undefined,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port}) ->
  	case Request#'3gpp_swm_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "unknown", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"start", "unknown", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_DEA'{'Result-Code' = ResultCode,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_swm_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "success", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"start", "success", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_DER'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_DEA'{'Result-Code' = _ResultCode,
  		'Subscription-Id' = [#'3gpp_sta_Subscription-Id'{
  				'Subscription-Id-Data' = Subscriber} | _]}, {Ip, _Port}) ->
  	case Request#'3gpp_swm_DER'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "failure", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, Subscriber, UserName};
  		OriginHost2 ->
  			{"start", "failure", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, Subscriber, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_STA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_sta_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_STA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_sta_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "success", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "success", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_sta_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_sta_STA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_sta_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "sta", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "failure", "sta", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_STA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_swm_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_STA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_swm_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "success", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "success", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swm_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_swm_STA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_swm_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "swm", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "failure", "swm", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_STA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_s6b_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_STA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_s6b_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "success", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "success", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_STR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_STA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_s6b_STR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "failure", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swx_RTR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_swx_RTA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_swx_RTR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "swx", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "swx", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swx_RTR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_swx_RTA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_swx_RTR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "success", "swx", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "success", "swx", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_swx_RTR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_swx_RTA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_swx_RTR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "swx", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "failure", "swx", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_AAR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_AAA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_s6b_AAR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "unknown", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "unknown", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_AAR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_AAA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_s6b_AAR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "success", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "success", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6b_AAR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = [UserName]} = Request,
  		#'3gpp_s6b_AAA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_s6b_AAR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "failure", "s6b", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "failure", "s6b", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_AIR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_AIA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_AIR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "unknown", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "unknown", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_AIR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_AIA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_s6a_AIR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "success", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "success", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_AIR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_AIA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_AIR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"start", "failure", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"start", "failure", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_ULR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_ULA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_ULR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"info", "unknown", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"info", "unknown", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_ULR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_ULA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_s6a_ULR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"info", "success", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"info", "success", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_ULR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_ULA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_ULR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"info", "failure", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"info", "failure", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_PUR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_PUA'{'Result-Code' = undefined}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_PUR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "unknown", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "unknown", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_PUR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_PUA'{'Result-Code' = ResultCode}, {Ip, _Port})
  		when ResultCode >= 2000, ResultCode < 3000 ->
  	case Request#'3gpp_s6a_PUR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "success", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "success", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end;
  dia_req_and_res(#'3gpp_s6a_PUR'{'Origin-Realm' = OriginRealm,
  		'Destination-Realm' = DesRealm, 'User-Name' = UserName} = Request,
  		#'3gpp_s6a_PUA'{'Result-Code' = _ResultCode}, {Ip, _Port}) ->
  	case Request#'3gpp_s6a_PUR'.'Origin-Host' of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"end", "failure", "s6a", OriginHost1, OriginHost1,
  					undefined, OriginRealm, DesRealm, undefined, UserName};
  		OriginHost2 ->
  			{"end", "failure", "s6a", OriginHost2,
  					Ip, OriginHost2, OriginRealm, DesRealm, undefined, UserName}
  	end.
  
  %% @hidden
  
negative.code: 
  %% @hidden
  dia_req_and_res(#'3gpp_ro_CCR'{'Origin-Realm' = OriginRealm,
  		'Origin-Host' = OriginHost, 'Destination-Realm' = DesRealm,
  		'User-Name' = UserName, 'Subscription-Id' = SubscriptionId},
  		#'3gpp_ro_CCA'{'Result-Code' = undefined}) ->
  	Subscriber = case SubscriptionId of
  		[] ->
  			undefined;
  		[#'3gpp_ro_Subscription-Id'{'Subscription-Id-Data' = Sub} | _] ->
  			Sub
  	end,
  	case OriginHost of
  		OriginHost1 when is_binary(OriginHost1) ->
  			{"unknown", "ro", OriginHost1, OriginHost1, undefined, OriginRealm,
  					DesRealm, Subscriber, UserName, "AAAAccountingUsageSpec"};
  