anchor.diff:              end
           end,
           Pings),
  -    Regs1 = lists:map(
  -        fun(#sipreg{next=Next}=Reg) ->
  -            case is_integer(Next) andalso Now>=Next of 
  -                true -> launch_register(AppId, Reg);
  -                false -> Reg
  -            end
  -        end,
  -        Regs),
  +    Regs1 = timer_register(AppId, Now, Regs, []),
       State#state{pings=Pings1, regs=Regs1}.
  +
  +
  +%% @private Only one register in each cycle
  +timer_register(AppId, Now, [#sipreg{next=Next}=Reg|Rest], Acc) ->
  +    case Now>=Next of
  +        true -> 
  +            Reg1 = launch_register(AppId, Reg),
  +            timer_register(AppId, -1, Rest, [Reg1|Acc]);
  +        false ->
  +            timer_register(AppId, Now, Rest, [Reg|Acc])
  +    end;
  +
  +timer_register(_, _, [], Acc) ->
  +    Acc.
   
   
   %%%%%% Register
  
positive.code: 
  -include("nksip.hrl").
  
  -define(DEFAULT_OB_TIME_ALL_FAIL, 3).
  -define(DEFAULT_OB_TIME_OK, 9).
  -define(DEFAULT_OB_TIME_MAX, 1800).
  
  
  
negative.code:             case nksip_transport:get_connected(AppId, Proto, Ip, Port) of
                  [{_, Pid}|_] -> 
                      Secs = case nksip_lib:get_integer(<<"Flow-Timer">>, Meta) of
                          FT when is_integer(FT), FT > 5 -> FT;
                          _ when Proto==udp -> ?DEFAULT_UDP_KEEPALIVE;
                          _ -> ?DEFAULT_TCP_KEEPALIVE
                      end,
  