anchor.diff:  call_callback(CBRef, Args, State) ->
     CBRef2 = gateway_reference:set_method(CBRef, <<"callback">>),
     invoke_rpc(CBRef2, Args, State).
  +
  +
   make_hookchannel_reference(ClientRef) ->
     SessionId = gateway_reference:get_destination_id(ClientRef),
     SystemRef = gateway_reference:client_reference(SessionId, <<"system">>),
  
positive.code: initialize_state({Privilege, ApiKey}, Id, Secret, State) ->
    gen_server:cast(self(), {send, list_to_binary(lists:concat([Id, "|", Secret]))}),
    IsReconnect =  ets:lookup(rabbithandlers, Id),
    Router = setup_routing(IsReconnect, Id, ApiKey),
    State#state{sessionid = Id, rabbit_handler = Router, api_key = ApiKey, privilege = Privilege}.
  
  setup_routing(_IsReconnect = [], Id, ApiKey) ->
    {ok, Router} = gateway_rabbit_sup:start_child(),
    gen_server:call(Router, {ready, self(), Id, ApiKey}),
    Router;
  
  setup_routing([{Id, {Timer, Router}}], Id, ApiKey) ->
     erlang:cancel_timer(Timer),
     gen_server:cast(Router, resume_subs),
     gen_server:cast(Router, {change_protocol, self()}),
  
negative.code: 
  handle_cast({msg, RawData}, State) ->
    {ok, Struct} = gateway_util:decode(RawData),
    Command = gateway_messages:struct_to_record(Struct),
    {noreply, handle_command(Command, State)};
  
  handle_cast({send, Data}, State = #state{outbound_connection = OutboundConnection = #gateway_connection{callback_module = Mod}, api_key = ApiKey}) ->
    case ctl_handler:update_metering(ApiKey) of
  