anchor.diff:              
   
   %% @private
  --spec do_register(pid(), #sipreg{}, #state{}) -> 
  +-spec register_opts(#sipreg{}) -> 
       ok.
   
  -do_register(Pid, SipReg, #state{app_id=AppId})->
  -    #sipreg{id=RegId, ruri=RUri, opts=Opts, interval=Interval, cseq=CSeq, 
  -            call_id=CallId} = SipReg,
  -    Opts1 = [make_contact, {call_id, CallId}, {cseq, CSeq}, 
  -                {expires, Interval}, get_response | Opts],
  -    {OK, CSeq1} = case nksip_uac:register(AppId, RUri, Opts1) of
  -        {resp, #sipmsg{class={resp, Code, _}, cseq=OK_CSeq}} 
  -            when Code>=200, Code<300 -> 
  -            {true, OK_CSeq+1};
  -        {resp, #sipmsg{cseq=Err_CSeq}}-> 
  -            {false, Err_CSeq+1};
  -        {error, _Error} -> 
  -            {false, CSeq+1}
  +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,
  -    gen_server:cast(Pid, {'$nksip_register_update', RegId, OK, CSeq1}).
  +    [
  +        make_contact, {call_id, CallId}, {cseq, CSeq}, {expires, Interval}, 
  +        async, {callback, CB}, {fields, [cseq_num]} 
  +        | Opts
  +    ].
  +
  +
  +    
  +
  +
  +
  +
  +
  +
  +
  
positive.code: 
  -include("nksip.hrl").
  
  
  %% ===================================================================
  %% Public
  
negative.code:                 end,
                  ObRegs)
      end,
      #state{
          app_id = AppId, 
          module = Module, 
          base_time = ?DEFAULT_OB_OK_TIME,
          pings = [], 
          regs = []
      }.
  
  
  %% @private
  