anchor.diff:  	    end,
   	    case NewParsed of
   		{invalid} ->
  -		    false;
  +		    {invalid};
   		_ ->
  -		    case catch make_logstr(NewParsed, IP) of
  +		    case catch check_packet(NewParsed, IP) of
   			{'EXIT', E} ->
  -			    logger:log(error, "=ERROR REPORT==== from sipserver:make_logstr()~n~p", [E]),
  +			    logger:log(error, "=ERROR REPORT==== from sipserver:check_packet()~n~p", [E]),
   			    logger:log(error, "CRASHED parsing packet [client=~s]", [IP]),
   			    {invalid};
   			{siperror, Code, Text} ->
  
positive.code:     [TopVia | _] = Via,
      TopVia.
  
  make_logstr({request, Method, URL, Header, Body}, IP) ->
      {_, FromURI} = sipheader:from(keylist:fetch("From", Header)),
      {_, ToURI} = sipheader:to(keylist:fetch("To", Header)),
  
negative.code: 			[CSeqMethod, IP, sipurl:print(FromURI), sipurl:print(ToURI), Warning])
      end.
  
  sanity_check_uri(Desc, {none, _, _, _, _, _}) ->
      throw({siperror, 400, "No user part in " ++ Desc ++ " URL"});
  sanity_check_uri(Desc, {_, _, none, _, _}) ->
      throw({siperror, 400, "No host part in " ++ Desc ++ " URL"});
  sanity_check_uri(Desc, URI) ->
      URI.
  
  get_env(Name) ->
      {ok, Value} = application:get_env(Name),
      Value.
  