anchor.diff:  %% @doc Generates a new request.
   %% See {@link nksip_uac} for the decription of most options.
   %% It will also add a <i>From</i> tag if not present.
  --spec make(nksip:app_id(), nksip:method(), nksip:user_uri(), nksip_lib:proplist()) ->    
  +-spec make(nksip:app_id(), nksip:method(), nksip:user_uri(), 
  +           nksip_lib:proplist(), nksip_lib:proplist()) ->    
       {ok, nksip:request(), nksip_lib:proplist()} | {error, Error} when
       Error :: invalid_uri | invalid_from | invalid_to | invalid_route |
                invalid_contact | invalid_cseq.
   
  -make(AppId, Method, Uri, Opts) ->
  +make(AppId, Method, Uri, Opts, AppOpts) ->
  +    FullOpts = Opts++AppOpts,
       try
           case nksip_parse:uris(Uri) of
               [RUri] -> ok;
               _ -> RUri = throw(invalid_uri)
           end,
  -        case nksip_parse:uris(nksip_lib:get_value(from, Opts)) of
  +        case nksip_parse:uris(nksip_lib:get_value(from, FullOpts)) of
               [From] -> ok;
               _ -> From = throw(invalid_from) 
           end,
  -        case nksip_lib:get_value(to, Opts) of
  +        case nksip_lib:get_value(to, FullOpts) of
               undefined -> 
                   To = RUri#uri{port=0, opts=[], 
                                   headers=[], ext_opts=[], ext_headers=[]};
  
positive.code: -module(nksip_uac_lib).
  -author('Carlos Gonzalez <carlosj.gf@gmail.com>').
  
  -export([make/4, make_cancel/1, is_stateless/2]).
  -include("nksip.hrl").
   
  
  
negative.code:             FromTag -> 
                  FromOpts = From#uri.ext_opts
          end,
          case nksip_lib:get_binary(user_agent, FullOpts) of
              <<>> -> UserAgent = <<"NkSIP ", ?VERSION>>;
              UserAgent -> ok
          end,
          Headers = 
                  proplists:get_all_values(pre_headers, FullOpts) ++
                  nksip_lib:get_value(headers, FullOpts, []) ++
                  proplists:get_all_values(post_headers, FullOpts),
          Body = nksip_lib:get_value(body, Opts, <<>>),
          Headers1 = nksip_headers:update(Headers, [
              {default_single, <<"User-Agent">>, UserAgent},
              case lists:member(make_allow, FullOpts) of
                  true -> {default_single, <<"Allow">>, nksip_sipapp_srv:allowed(AppId)};
                  false -> []
              end,
              case lists:member(make_supported, FullOpts) of
                  true -> {default_single, <<"Supported">>, ?SUPPORTED};
                  false -> []
              end,
              case lists:member(make_accept, FullOpts) of
                  true -> {default_single, <<"Accept">>, ?ACCEPT};
                  false -> []
              end,
              case lists:member(make_date, FullOpts) of
                  true -> {default_single, <<"Date">>, nksip_lib:to_binary(
                                                      httpd_util:rfc1123_date())};
                  false -> []
  