anchor.diff:  url2str(URL) ->
       sipurl:print(URL).
   
  -sanity_check_contact(Name, Header) ->
  +sanity_check_contact(Type, Name, Header) ->
       case keylist:fetch(Name, Header) of
   	[Str] ->
   	    case sipheader:from([Str]) of
   		{_, URI} ->
  -		    sanity_check_uri(Name ++ ":", URI, Header);
  +		    sanity_check_uri(Type, Name ++ ":", URI, Header);
   		_ ->
  -		    throw({sipparseerror, Header, 400, "Invalid " ++ Name ++ ": header"})
  +		    throw({sipparseerror, Type, Header, 400, "Invalid " ++ Name ++ ": header"})
   	    end;
   	_ ->
  -	    throw({sipparseerror, Header, 400, "Missing " ++ Name ++ ": header"})
  -    end.
  -
  -sanity_check_uri(Desc, {none, _, _, _, _, _}, Header) ->
  -    throw({sipparseerror, Header, 400, "No user part in " ++ Desc ++ " URL"});
  -sanity_check_uri(Desc, {_, _, none, _, _}, Header) ->
  -    throw({sipparseerror, Header, 400, "No host part in " ++ Desc ++ " URL"});
  -sanity_check_uri(_, URI, _) ->
  +	    %% Header is either missing, or []
  +	    throw({sipparseerror, Type, Header, 400, "Missing or invalid " ++ Name ++ ": header"})
  +    end.
  +
  +sanity_check_uri(Type, Desc, {none, _, _, _, _, _}, Header) ->
  +    throw({sipparseerror, Type, Header, 400, "No user part in " ++ Desc ++ " URL"});
  +sanity_check_uri(Type, Desc, {_, _, none, _, _}, Header) ->
  +    throw({sipparseerror, Type, Header, 400, "No host part in " ++ Desc ++ " URL"});
  +sanity_check_uri(_, _, URI, _) ->
       URI.
   
   check_supported_uri_scheme({unparseable, URIstr}, Header) ->
       case string:chr(URIstr, $:) of
   	0 ->
  -	    throw({sipparseerror, Header, 416, "Unsupported URI Scheme"});
  +	    throw({sipparseerror, request, Header, 416, "Unsupported URI Scheme"});
   	Index ->
   	    Scheme = string:substr(URIstr, 1, Index),
  -	    throw({sipparseerror, Header, 416, "Unsupported URI Scheme (" ++ Scheme ++ ")"})
  +	    throw({sipparseerror, request, Header, 416, "Unsupported URI Scheme (" ++ Scheme ++ ")"})
       end;
   check_supported_uri_scheme(URI, _) ->
       true.
  
positive.code: 	    true
      end;
  check_packet({response, Status, Reason, Header, Body}, Origin) ->
      sanity_check_contact("From", Header),
      sanity_check_contact("To", Header).
  
  check_for_loop(Header, URI, Method) ->
      LoopCookie = siprequest:get_loop_cookie(Header, URI),
  
negative.code: 		{'EXIT', E} ->
  		    logger:log(error, "=ERROR REPORT==== from sipserver:process_parsed_packet() :~n~p", [E]),
  		    {error};
  		{sipparseerror, request, Header, Status, Reason} ->
  		    logger:log(error, "INVALID request [client=~s] ~p ~s",
  			       [origin2str(Origin, "unknown"), Status, Reason]),
  		    parse_do_internal_error(Header, Socket, Status, Reason, []);
  		{sipparseerror, request, Header, Status, Reason, ExtraHeaders} ->
  		    logger:log(error, "INVALID request [client=~s]: ~s -> ~p ~s",
  			       [origin2str(Origin, "unknown"), Status, Reason]),
  		    parse_do_internal_error(Header, Socket, Status, Reason, ExtraHeaders);
  		{sipparseerror, response, Header, Status, Reason} ->
  		    logger:log(error, "INVALID response [client=~s]: ~s -> ~p ~s (dropping)",
  			       [origin2str(Origin, "unknown"), Status, Reason]),
  		    false;
  		{sipparseerror, response, Header, Status, Reason, ExtraHeaders} ->
  		    logger:log(error, "INVALID response [client=~s]: ~s -> ~p ~s (dropping)",
  			       [origin2str(Origin, "unknown"), Status, Reason]),
  		    false;
  		{siperror, Status, Reason} ->
  		    logger:log(error, "INVALID packet [client=~s] ~p ~s, CAN'T SEND RESPONSE",
  			       [origin2str(Origin, "unknown"), Status, Reason]),
  