anchor.diff:  %%% @copyright 2011 Ivan Dubrov. See LICENSE file.
   %%%----------------------------------------------------------------
   -module(sip_message).
  +-compile({parse_transform, do}).
   
   %%-----------------------------------------------------------------
   %% Exports
  
positive.code:         {tag, _ToTag} -> false
      end;
  is_dialog_establishing(_Method, _Status, _Msg) -> false.
  
  
  %% @doc Retrieve method of SIP message
  %%
  
negative.code:                                 {'max-forwards', 70},
                                  {via, sip_headers:via(udp, "localhost", [])},
                                  {require, <<"foo">>}]},
      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]}]})),
  