anchor.diff:          "PRACK" -> 'PRACK';
           "UPDATE" -> 'UPDATE';
           _ -> list_to_binary(Method) 
  -    end.
  -
  -
  -%% @doc Parses all `Name' headers of a request or response and gets a list 
  -%% of `nksip:uri()'. If non-valid values are found, `[]' is returned.
  --spec header_uris(binary(), nksip:request()|nksip:response()|[nksip:header()]) -> 
  -    [nksip:uri()].
  -
  -header_uris(Name, #sipmsg{headers=Headers}) ->
  -    header_uris(Name, Headers);
  -
  -header_uris(Name, Headers) when is_list(Headers) ->
  -    case uris(nksip_lib:bjoin(header_values(Name, Headers))) of
  -        error -> [];
  -        UriList -> UriList
  -    end.
  -
  -
  -%% @doc Parse all `Name' headers of a request or response and get a list of `integer()'.
  -%% If non-valid values are found, `[]' is returned.
  --spec header_integers(binary(), nksip:request()|nksip:response()|[nksip:header()]) -> 
  -    [integer()].
  -
  -header_integers(Name, #sipmsg{headers=Headers}) ->
  -    header_integers(Name, Headers);
  -
  -header_integers(Name, Headers) when is_list(Headers) ->
  -    case integers(header_values(Name, Headers)) of
  -        error -> [];
  -        Integers -> Integers
  -    end.
  -
  -
  -%% @doc Parse all `Name' headers of a request or response and get a list of dates. 
  -%% If non-valid values are found, `[]' is returned.
  --spec header_dates(binary(), nksip:request()|nksip:response()|[nksip:header()]) -> 
  -    [calendar:datetime()].
  -
  -header_dates(Name, #sipmsg{headers=Headers}) ->
  -    header_dates(Name, Headers);
  -
  -header_dates(Name, Headers) when is_list(Headers) ->
  -    case dates(header_values(Name, Headers)) of
  -        error -> [];
  -        Dates -> Dates
  -    end.
  -
  -
  -%% @doc Parse all `Name' headers of a request or response and get a list of tokens.
  -%% If non-valid values are found, `[]' is returned.
  --spec header_tokens(binary(), nksip:request()|nksip:response()|[nksip:header()]) -> 
  -    [nksip_tokenizer:token()].
  -
  -header_tokens(Name, #sipmsg{headers=Headers}) ->
  -    header_tokens(Name, Headers);
  -
  -header_tokens(Name, Headers) when is_list(Headers) ->
  -    case tokens(header_values(Name, Headers)) of
  -        error -> [];
  -        Tokens -> Tokens
       end.
   
   
  
positive.code:         true -> throw({400, <<"Invalid CSeq">>});
          false -> ok
      end,
      case header_integers(<<"Max-Forwards">>, Headers) of
          [] -> Forwards = 70;
          [0] -> Forwards=throw({483, "Too Many Hops"});
          [Forwards] when is_integer(Forwards), Forwards>0, Forwards<300 -> ok;
          _ -> Forwards = throw({400, <<"Invalid Max-Forwards">>})
      end,
      ContentType = header_tokens(<<"Content-Type">>, Headers),
      case header_values(<<"Content-Length">>, Headers) of
          [] when Proto=/=tcp, Proto=/=tls -> 
              ok;
  
negative.code: -include("nksip.hrl").
  -include("nksip_call.hrl").
  
  -export([method/1, scheme/1, uri2ruri/1, aors/1, uris/1, ruris/1, vias/1]).
  -export([tokens/1, integers/1, dates/1, transport/1]).
  -export([packet/3, raw_sipmsg/1]).
  
  -export_type([msg_class/0]).
  