anchor.diff:  	    end
       end.
   
  -globalrewrite("0000" ++ Number) ->
  -    "+" ++ Number;
  -globalrewrite("000" ++ Number) ->
  -    "+46" ++ Number;
  -globalrewrite("00" ++ Number) ->
  -    "+468" ++ Number;
  -globalrewrite("0" ++ Number) ->
  -    none;
  -globalrewrite(Number) ->
  -    "+468790" ++ Number.
  +enumlookup(Number) ->
  +    case util:regexp_rewrite(Number, sipserver:get_env(internal_to_e164, [])) of
  +	nomatch ->
  +	    none;
  +	E164 ->
  +	    dnsutil:enumlookup(E164)
  +    end.
   
   lookupdefault(User) ->
       case util:isnumeric(User) of
   	true ->
  -	    case dnsutil:enumlookup(globalrewrite(User)) of
  +	    case enumlookup(User) of
   		none ->
   		    {proxy, {User, none, sipserver:get_env(defaultroute), none, []}};
   		URL ->
  
positive.code: 	{redirect, Loc} ->
  	    logger:log(normal, "Redirect ~s", [sipurl:print(Loc)]),
  	    siprequest:send_redirect(Loc, Header, Socket)
      end;
  
  request(Method, URL, Header, Body, Socket) ->
  %    logger:log(normal, "Redirect ~s", [sipurl:print(URL)]),
      siprequest:send_redirect(URL, Header, Socket).
  
  response(Status, Reason, Header, Body, Socket) ->
      logger:log(normal, "Response ~p ~s", [Status, Reason]),
  
negative.code: 	    siprequest:send_auth_req(Header, Socket, sipauth:get_challenge(), false)
      end;
  
  request(Method, URL, Header, Body, Socket) ->
      logger:log(normal, "~s ~s~n",
  	       [Method, sipurl:print(URL)]),
      Location = lookupphone(URL),
      logger:log(debug, "Location: ~p", [Location]),
      case Location of
  	none ->
  