anchor.diff:  %%--------------------------------------------------------------------
   
   
  +%%--------------------------------------------------------------------
  +%% Function: request_to_me(Request, LogTag) 
  +%%           Request = request record()
  +%%           LogTag  = string()
  +%% Descrip.: Request is meant for this proxy, if it is OPTIONS we
  +%%           respond 200 Ok, otherwise we respond 481 Call/
  +%%           transaction does not exist.
  +%% Returns : Does not matter.
  +%%--------------------------------------------------------------------
  +request_to_me(Request, LogTag) when is_record(Request, request), Request#request.method == "OPTIONS" ->
  +    logger:log(normal, "~s: appserver: OPTIONS to me -> 200 OK", [LogTag]),
  +    logger:log(debug, "XXX The OPTIONS response SHOULD include Accept, Accept-Encoding,"
  +	       " Accept-Language, and Supported headers. RFC 3261 section 11"),
  +    transactionlayer:send_response_request(Request, 200, "OK");
  +
  +request_to_me(Request, LogTag) when is_record(Request, request) ->
  +    logger:log(normal, "~s: appserver: non-OPTIONS request to me -> 481 Call/Transaction Does Not Exist", 
  +	       [LogTag]),
  +    transactionlayer:send_response_request(Request, 481, "Call/Transaction Does Not Exist").
  +
  +
  +%%--------------------------------------------------------------------
  +%% Function: create_session(Request, Origin, LogStr)
  +%%           Request = request record()
  +%%           Origin  = siporigin record()
  +%%           LogStr  = string()
  +%% Descrip.: Request was not meant for this proxy itself - find out if
  +%%           this request is for one of our users, and if so find out
  +%%           what actions to perform for the request.
  +%% Returns : void() | throw({siperror, ...})
  +%%--------------------------------------------------------------------
   create_session(Request, Origin, LogStr) when record(Request, request), record(Origin, siporigin) ->
       %% create header suitable for answering the incoming request
       URI = Request#request.uri,
  
positive.code:     logger:log(error, "appserver: Illegal location in locations_to_actions2: ~p", [H]),
      locations_to_actions2(T, Res).
  
  fork_actions(BranchBase, CallBranch, CallHandler, Request, Actions) when record(Request, request) ->
      {Method, URI} = {Request#request.method, Request#request.uri},
      ForkPid = sipserver:safe_spawn(fun start_actions/4, [BranchBase, self(), Request, Actions]),
      logger:log(normal, "~s: Appserver: Forking request, ~p actions",
  	       [BranchBase, length(Actions)]),
      logger:log(debug, "Appserver: Starting up call, glue process ~p, CallHandler ~p, ForkPid ~p",
  	       [self(), CallHandler, ForkPid]),
      InitState = #state{request=Request, sipmethod=Method, callhandler=CallHandler, forkpid=ForkPid, cancelled=false, completed=false},
      process_messages(InitState),
      logger:log(normal, "Appserver glue: Finished with call (~s ~s), exiting.", [Method, sipurl:print(URI)]),
      ok.
  
  start_actions(BranchBase, GluePid, OrigRequest, Actions) when record(OrigRequest, request) ->
      {Method, URI} = {OrigRequest#request.method, OrigRequest#request.uri},
      Timeout = 32,
      %% We don't return from fork() until all Actions are done, and fork() signals GluePid
      %% when it is done.
      case sipproxy:start(BranchBase, GluePid, OrigRequest, Actions, Timeout) of
  	ok ->
  	    logger:log(debug, "Appserver forker : sipproxy fork of request ~s ~s done, start_actions() returning", [Method, sipurl:print(URI)]),
  	    true;
  	{error, What} ->
  	    logger:log(error, "Appserver forker : sipproxy fork of request ~s ~s failed : ~p", [Method, sipurl:print(URI), What]), 
  	    transactionlayer:send_response_request(OrigRequest, 500, "Server Internal Error")
      end.
  
  %% Receive messages from branch pids and do whatever is necessary with them
  process_messages(State) when record(State, state), State#state.callhandler == none, State#state.forkpid == none -> 
      logger:log(debug, "Appserver glue: Both CallHandler and ForkPid are 'none' - terminating"),
      ok;
  process_messages(State) when record(State, state) ->
  
negative.code: 				    throw({siperror, 500, "Server Internal Error"});
  				Index when integer(Index) ->
  				    BranchBase = string:substr(CallBranch, 1, Index - 1),
  				    fork_actions(BranchBase, CallHandler, Request, Actions)
  			    end
  		    end
  	    end;
  