anchor.diff:      ok :: boolean(),
       last :: nksip_lib:timestamp(),
       interval :: non_neg_integer(),
  +    user_interval :: non_neg_integer(),
       checking :: boolean(),
  +    fails :: non_neg_integer(),
       from :: any()
   }).
   
  
positive.code:                 end,
                  ObRegs)
      end,
      #state{app_id=AppId, module=Module, pings=[], regs=[]}.
  
  
  %% @private
  
negative.code:             
  
  %% @private
  -spec register_opts(#sipreg{}) -> 
      ok.
  
  register_opts(SipReg)->
      #sipreg{
          id = RegId, 
          opts = Opts, 
          interval = Interval, 
          cseq = CSeq,
          call_id = CallId
      } = SipReg,
      Self = self(),
      CB = fun(Resp) ->
          case Resp of
              {ok, Code, [{cseq_num, CSeq1}]} when Code>=200, Code<300 ->
                  gen_server:cast(Self, {'$nksip_register_update', RegId, true, CSeq1});
              {ok, Code, [{cseq_num, CSeq1}]} when Code>300 ->
                  gen_server:cast(Self, {'$nksip_register_update', RegId, false, CSeq1});
              _ ->
                  ok
          end
      end,
      [
          make_contact, {call_id, CallId}, {cseq, CSeq}, {expires, Interval}, 
          async, {callback, CB}, {fields, [cseq_num]} 
          | Opts
      ].
  
  
      
  
  
  
  
  
  
  
  