anchor.diff:      Registrar = {registrar, {registrar, start_link, []}, permanent, 2000, worker, [registrar]},
       [none, stateful, {append, [Registrar]}].
   
  -
  -route_request(Request) when record(Request, request) ->
  -    {Method, URL, Header} = {Request#request.method, Request#request.uri, Request#request.header},
  -    {User, Pass, Host, Port, Parameters} = URL,
  -    Loc1 = case local:homedomain(Host) of
  -	true ->
  -	    case is_request_to_me(Method, URL, Header) of
  -		true ->
  -		    {me};
  -		_ ->
  -		    request_to_homedomain(URL)
  -	    end;
  -	_ ->
  -	    request_to_remote(URL)
  -    end,
  -    case Loc1 of
  -	nomatch ->
  -	    logger:log(debug, "Routing: No match - trying default route"),
  -	    local:lookupdefault(URL);
  -	_ ->
  -	    Loc1
  -    end.
  -
  -is_request_to_me(_, {none, _, _, _, _}, Header) ->
  -    true;
  -is_request_to_me("OPTIONS", URL, Header) ->
  -    % RFC3261 # 11 says a proxy that receives an OPTIONS request with a Max-Forwards less than one
  -    % MAY treat it as a request to the proxy.
  -    MaxForwards =
  -	case keylist:fetch("Max-Forwards", Header) of
  -	    [M] ->
  -		lists:min([255, list_to_integer(M) - 1]);
  -	    [] ->
  -		70
  -	end,
  -    if
  -	MaxForwards < 1 ->
  -	    logger:log(debug, "Routing: Request is OPTIONS and Max-Forwards < 1, treating it as a request to me."),
  -	    true;
  -	true ->
  -	    false
  -    end;
  -is_request_to_me(_, _, _) ->
  -    false.
   
   %% Function: request/3
   %% Description: Yxa applications must export an request/3 function.
  
positive.code: 	    transactionlayer:send_response_handler(THandler, 500, "Server Internal Error")
      end.
  
  proxy_request(THandler, Request, DstList, Parameters) when record(Request, request) ->
      sipserver:safe_spawn(sippipe, start, [THandler, none, Request, DstList, Parameters, 900]).
  
  relay_request(THandler, Request, URI, Origin, LogTag) when record(Request, request), Request#request.method == "CANCEL"; Request#request.method == "BYE" ->
      logger:log(normal, "~s: incomingproxy: Relay ~s ~s (unauthenticated)",
  	       [LogTag, Request#request.method, sipurl:print(Request#request.uri)]),
      sipserver:safe_spawn(sippipe, start, [THandler, none, Request, URI, [], 900]);
  
  relay_request(THandler, Request, DstURI, Origin, LogTag) when record(Request, request) ->
      {Method, URI, Header} = {Request#request.method, Request#request.uri, Request#request.header},
      case sipauth:get_user_verified_proxy(Header, Method) of
  
negative.code: 
  -include("siprecords.hrl").
  -include("sipsocket.hrl").
  
  %%--------------------------------------------------------------------
  %%% Standard Yxa SIP-application exported functions
  %%--------------------------------------------------------------------
  
  
  %% Function: init/0
  %% Description: Yxa applications must export an init/0 function.
  