anchor.diff:  	    %% but can't do it itself because that would block the transactionlayer process.
   	    my_apply(AppModule, R, Origin, LogStr);
   	_ ->
  -	    Type = case R of
  -		       _ when record(R, request) -> request;
  -		       _ -> response
  -		   end,
  +	    Type = element(1, R),	%% get record type - 'request' or 'response'
   	    logger:log(error, "Sipserver: Got no or unknown response from transaction_layer regarding ~p : ~s",
   		       [Type, LogStr]),
   	    {siperror, 500, "Server Internal Error"}
  
positive.code:     ViaHostname = siprequest:myhostname(),
      ViaPort = sipserver:get_listenport(Origin#siporigin.proto),
      CmpVia = #via{host=ViaHostname, port=ViaPort},
      case via_indicates_loop(LoopCookie, CmpVia,
      			    sipheader:via(keylist:fetch("Via", Header))) of
  	true ->
  	    throw({sipparseerror, request, Header, 482, "Loop Detected"});
  	_ ->
  	    true
  
negative.code:     NewHeader1 = fix_topvia_received(Request#request.header, Origin),
      NewHeader2 = fix_topvia_rport(NewHeader1, Origin),
      check_packet(Request#request{header=NewHeader2}, Origin),
      {NewURI, NewHeader3} =
  	case received_from_strict_router(Request#request.uri, NewHeader2) of
  	    true ->
  		logger:log(debug, "Sipserver: Received request with a"
  			   " Request-URI I (probably) put in a Record-Route. "
  			   "Pop real Request-URI from Route-header."),
  		ReverseRoute = lists:reverse(sipheader:route(NewHeader2)),
  		[FirstRoute | NewReverseRoute] = ReverseRoute,
  		NewReqURI = sipurl:parse(FirstRoute#contact.urlstr),
  		NewH = 
  		    case NewReverseRoute of
  			[] ->
  			    keylist:delete("Route", NewHeader2);
  			_ ->
  			    keylist:set("Route", sipheader:contact_print(
  						   lists:reverse(NewReverseRoute)), NewHeader2)
  		end,
  		{NewReqURI, NewH};
  	    _ ->
  		{Request#request.uri, NewHeader2}
  	end,
      NewHeader4 = remove_route_matching_me(NewHeader3),
      NewRequest = Request#request{uri=NewURI, header=NewHeader4},
      LogStr = make_logstr(NewRequest, Origin),
  