anchor.diff:                                  {'max-forwards', 70},
                                   {via, sip_headers:via(udp, "localhost", [])},
                                   {require, <<"foo">>}]},
  -
  -    % No contact in INVITE
  -    InvalidRequest = ValidRequest#sip_request{method = 'INVITE'},
  +    ValidResponse = create_response(ValidRequest, 200),
  +
  +    % No contact in dialog-establishing request/response
  +    InvalidRequest = replace_top_header(cseq, sip_headers:cseq(1, 'INVITE'), ValidRequest#sip_request{method = 'INVITE'}),
  +    InvalidResponse = create_response(InvalidRequest, 200),
  +
       % with added contact header
       ValidRequest2 =
           InvalidRequest#sip_request{headers = [{contact, <<"sip:alice@localhost">>} | InvalidRequest#sip_request.headers]},
  +
  +    ValidResponse2 =
  +        InvalidResponse#sip_response{headers = [{contact, <<"sip:alice@localhost">>} | InvalidRequest#sip_request.headers]},
  +    ValidResponse3 = create_response(InvalidRequest, 300), % not dialog-establishing response
  +
  +
       [% Header lookup functions
        ?_assertEqual(Via1, header_top_value('via', #sip_request{headers = [{'via', [Via1, Via2]}]})),
        ?_assertEqual([Via1, Via2, Via1Up], header_values('via', #sip_request{headers = [{'via', Via1}, {'via', [Via2, Via1Up]}]})),
  
positive.code:         {tag, _ToTag} -> false
      end;
  is_dialog_establishing(_Method, _Status, _Msg) -> false.
  
  
  %% @doc Retrieve method of SIP message
  %%
  
negative.code: create_response(Request, Status) ->
      create_response(Request, Status, default_reason(Status)).
  
  check(true, _Reason) -> ok;
  check(false, Reason) -> error_m:fail(Reason).
  
  count(Name, Msg) ->
      length(header_values(Name, Msg)).
  
  is_contact_valid(Msg) ->
      case header_values(contact, Msg) of
          [Contact] ->
              is_record(Contact#sip_hdr_address.uri, sip_uri);
          _Other -> false % either no contact header or multiple headers
      end.
  
  %% @doc Validate that request contains all required headers
  %% A valid SIP request formulated by a UAC MUST, at a minimum, contain
  %% the following header fields: To, From, CSeq, Call-ID, Max-Forwards,
  