anchor.diff:  	    none;
   	URL ->
   	    {E164User, _, E164Host, _, _} = sipurl:parse(URL),
  -	    IsMe = is_me(E164Host),
  +	    IsMe = homedomain(E164Host),
   	    NewE164 = rewrite_potn_to_e164(E164User),
   	    SameE164 = util:casecompare(NewE164, "+" ++ E164),
   	    if
  
positive.code: 	    logger:log(debug, "Lookup: Address lookup of ~p -> ~p", [Key, Loc]),
  	    Loc;
  	{atomic, Locations} ->
  	    BestLocations = prioritize_locations(Locations),
  	    logger:log(debug, "Lookup: Best location(s) of ~p :~n~p", [Key, BestLocations]),
  	    % check if more than one location was found.
  	    case BestLocations of
  	        [] ->
  
negative.code:     {none, [], none, never};
  prioritize_locations(Locations) ->
      BestPrio = lists:min(get_prioritys(Locations)),
      get_locations_with_prio(list_to_integer(BestPrio), Locations).
  
  get_locations_with_prio(_, []) ->
      [];
  get_locations_with_prio(Priority, [Location | Rest]) ->
      {Contact, Flags, Class, Expire} = Location,
      Prio = lists:keysearch(priority, 1, Flags),
      case Prio of
  	{value, {priority, Priority}} ->
  	    lists:append([{Contact, Flags, Class, Expire}], get_locations_with_prio(Priority, Rest));
  	  _ ->
  	    get_locations_with_prio(Priority, Rest)
      end.
  
  get_prioritys(Locations) ->
      lists:map(fun ({Location, Flags, Class, Expire}) ->
  