anchor.diff:  					[{'=<', Prefix, VarMatch}, {'>', Prefix2, VarMatch}]}];
   		_ when Op == exact ->
   			Prefix = list_to_binary(UserNameValue),
  -			SubscriptionMC = {'or', {'and', {'=:=', '$100',
  -					?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'}, {'==', '$101', Prefix}},
  -					{'and', {'=:=', '$102', ?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'},
  -					{'==', '$103', Prefix}}},
  +			SubscriptionMC = {'or', {'and', {'=:=', VarMatch1,
  +					?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'}, {'==', VarMatch2, Prefix}},
  +					{'and', {'=:=', VarMatch3, ?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'},
  +					{'==', VarMatch4, Prefix}}},
   			NewMC = add_condition(MC, SubscriptionMC),
            ReqAttrs2 = [{#'3gpp_ro_CCR'{'Subscription-Id'
                  = [#'3gpp_ro_Subscription-Id'{'Subscription-Id-Type'
  -               = '$100', 'Subscription-Id-Data' = '$101', _ = '_'},
  -               #'3gpp_ro_Subscription-Id'{'Subscription-Id-Type' = '$102',
  -               'Subscription-Id-Data' = '$103', _ = '_'}], _ = '_'}, [NewMC]}]
  -	end,
  -	characteristic(T, diameter, Types, ReqAttrs2, RespAttrs, N + 1);
  +               = VarMatch1, 'Subscription-Id-Data' = VarMatch2, _ = '_'},
  +               #'3gpp_ro_Subscription-Id'{'Subscription-Id-Type' = VarMatch3,
  +               'Subscription-Id-Data' = VarMatch4, _ = '_'}], _ = '_'}, [NewMC]}]
  +	end,
  +	characteristic(T, diameter, Types, ReqAttrs2, RespAttrs, N + 4);
   characteristic({"name", exact, "imsi"}, {"value", Op, UserNameValue},
   		T, diameter, Types, '_' = MC, RespAttrs, N) when is_list(UserNameValue) ->
  -	VarMatch = build_var_match(N),
  +	VarMatch1 = build_var_match(N),
  +	VarMatch2 = build_var_match(N + 1),
  +	VarMatch3 = build_var_match(N + 2),
  +	VarMatch4 = build_var_match(N + 3),
   	case lists:last(UserNameValue) of
   		$% when Op == gte ->
   			Pre = lists:droplast(UserNameValue),
  
positive.code: 					[{'=<', Prefix, VarMatch}, {'>', Prefix2, VarMatch}]}];
  		_ when Op == exact ->
  			Prefix = list_to_binary(UserNameValue),
  			SubscriptionMC = {'or', {'and', {'=:=', '$100',
  					?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_IMSI'}, {'==', '$101', Prefix}},
  					{'and', {'=:=', '$102', ?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_IMSI'},
  					{'==', '$103', Prefix}}},
  			NewMC = add_condition(MC, SubscriptionMC),
           ReqAttrs2 = [{CCR#'3gpp_ro_CCR'{'Subscription-Id'
                 = [#'3gpp_ro_Subscription-Id'{'Subscription-Id-Type'
                 = '$100', 'Subscription-Id-Data' = '$101', _ = '_'},
                 #'3gpp_ro_Subscription-Id'{'Subscription-Id-Type' = '$102',
                 'Subscription-Id-Data' = '$103', _ = '_'}]}, [NewMC]}]
  	end,
  	characteristic(T, diameter, Types, ReqAttrs2, RespAttrs, N + 1);
  characteristic({"name", exact, "username"}, {"value", Op, UserName},
  		T, diameter, Types, [{CCR, _MC}], RespAttrs, N) when is_list(UserName) ->
  	VarMatch = build_var_match(N),
  
negative.code: 					[{'=<', Prefix, VarMatch}, {'>', Prefix2, VarMatch}]}];
  		_ when Op == exact ->
  			Prefix = list_to_binary(UserName),
  			SubscriptionMC = {'or', {'and', {'=:=', VarMatch1,
  					?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'}, {'==', VarMatch2, Prefix}},
  					{'and', {'=:=', VarMatch3, ?'3GPP_RO_SUBSCRIPTION-ID-TYPE_END_USER_E164'},
  					{'==', VarMatch4, Prefix}}},
  			NewMC = add_condition(MC, SubscriptionMC),
  			ReqAttrs2 = [{CCR#'3gpp_ro_CCR'{'Subscription-Id'
  					= [#'3gpp_ro_Subscription-Id'{'Subscription-Id-Type'
  					= VarMatch1, 'Subscription-Id-Data' = VarMatch2, _ = '_'},
  					#'3gpp_ro_Subscription-Id'{'Subscription-Id-Type' = VarMatch3,
  					'Subscription-Id-Data' = VarMatch4, _ = '_'}]}, [NewMC]}]
  	end,
  	characteristic(T, diameter, Types, ReqAttrs2, RespAttrs, N + 4);
  characteristic({"name", exact, "imsi"}, {"value", Op, UserNameValue},
  		T, diameter, Types, [{CCR, MC}], RespAttrs, N) when is_list(UserNameValue) ->
  	VarMatch1 = build_var_match(N),
  	VarMatch2 = build_var_match(N + 1),
  	VarMatch3 = build_var_match(N + 2),
  	VarMatch4 = build_var_match(N + 3),
  	case lists:last(UserNameValue) of
  		$% when Op == gte ->
  			Pre = lists:droplast(UserNameValue),
  