anchor.diff:      ok.
   
   
  -%% @private
  --spec make_updates(integer(), integer(), integer(), nksip_lib:timestamp(), [#uri{}], 
  -                    [{index(), nksip:uri(), nksip_lib:timestamp(), float()}]) ->
  -    [{index(), nksip:uri(), nksip_lib:timestamp(), float()}].               
  -
  -make_updates(Min, Max, Default, Now,
  -                [#uri{scheme=Scheme, user=User, ext_opts=Opts}=Contact|Rest], 
  -                Acc) ->
  -    Exp1 = case nksip_lib:get_list(<<"expires">>, Opts) of
  +%% @private Extracts from each contact a index, uri, expire time and q
  +-spec gen_regcontacts([#uri{}], #reg_contact{}, 
  +                      {integer(), integer(), integer(), nksip_lib:timestamp()}, 
  +                      true|false|unsupported, [reg_info()]) ->
  +    [reg_info()].
  +
  +gen_regcontacts([Contact|Rest], Base, Times, ObProc, Acc) ->
  +    #uri{scheme=Scheme, user=User, ext_opts=Opts, domain=Domain} = Contact,
  +    {Min, Max, Default, Now} = Times,
  +    case Domain of
  +        <<"*">> -> throw(invalid_request);
  +        _ -> ok
  +    end,
  +    UriExp = case nksip_lib:get_list(<<"expires">>, Opts) of
           [] ->
               Default;
           Exp1List ->
  
positive.code:         Port::inet:port_number()
      } 
      |
      {instance, Instance::binary(), RegId::binary()}.
  
  
  
  %% ===================================================================
  
negative.code: -spec request(nksip:request()) ->
      nksip:sipreply().
  
  request(Req) ->
      try
          {ObProc, Req1} = check_outbound(Req),
          process(Req1, ObProc),
          #sipmsg{app_id=AppId, to=#uri{scheme=Scheme, user=ToUser, domain=ToDomain}} = Req,
          {ok, Regs} = callback_get(AppId, {Scheme, ToUser, ToDomain}),
          Contacts1 = [Contact || #reg_contact{contact=Contact} <- Regs],
          ObReq = case 
              ObProc andalso [true || #reg_contact{index={ob, _, _}} <- Regs] 
          of
              [_|_] -> [{require, <<"outbound">>}];
              _ -> []
          end,
          {ok, [], <<>>, 
              [{contact, Contacts1}, make_date, make_allow, make_supported | ObReq]}
      catch
          throw:Throw -> Throw
      end.
  