anchor.diff:  	{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).
  +    end.
   
   response(Status, Reason, Header, Body, Socket) ->
       logger:log(normal, "Response ~p ~s", [Status, Reason]),
  
positive.code: 	    siprequest:send_auth_req(Header, Socket, sipauth:get_challenge(), false)
      end;
  
  request(Method, {User, Pass, "kth.se", Port, Parameters}, Header, Body, Socket) ->
      logger:log(normal, "~s ~s~n",
  	       [Method, sipurl:print({User, Pass, "kth.se", Port, Parameters})]),
      Location = lookupphone(User),
      logger:log(debug, "Location: ~p", [Location]),
      case Location of
  	none ->
  
negative.code: 	    none
      end.
  
  homedomain(Domain) ->
      util:casecompare(sipserver:get_env(homedomain), Domain).
  
  lookupphone(URL) ->
      {User, Pass, Host, Port, Parameters} = URL,
      case homedomain(Host) of
  	true ->
  	    Loc1 = lookuproute(User),
  	    Loc2 = case Loc1 of
  		       none ->
  			   lookupmail(User);
  		       Loc1 ->
  			   Loc1
  		   end,
  	    case Loc2 of
  		none ->
  		    lookupdefault(User);
  		Loc2 ->
  		    Loc2
  	    end;
  	_ ->
  	    {redirect, URL}
      end.
  
  request("REGISTER", URL, Header, Body, Socket) ->
  