anchor.diff:  make_id(#sipmsg{event={Event, Opts}}) ->
       Id = nksip_lib:get_value(<<"id">>, Opts),
       nksip_lib:hash({Event, Id}).
  -
  -
  -
  -% %% @private
  -% -spec id(nksip:request()|nksip:response()) ->
  -%     nksip:id().
  -
  -% id(#sipmsg{cseq={CSeq, 'REFER'}, dialog_id=DialogId}) ->
  -%     Event = {<<"refer">>, [{<<"id">>, nksip_lib:to_binary(CSeq)}]},
  -%     get_id(Event, DialogId);
  -
  -% id(#sipmsg{event = Event, dialog_id = <<"D_", _/binary>>=DialogId}) ->
  -%     get_id(Event, DialogId).
  -
   
   
   %% @private Finds a event.
  
positive.code:         throw:invalid -> invalid
      end.
  
  % %% @private
  % find_sep([$_|Rest], Acc) -> {list_to_binary(lists:reverse(Acc)), Rest};
  % find_sep([], Acc) -> {list_to_binary(lists:reverse(Acc)), []};
  % find_sep([Ch|Rest], Acc) -> find_sep(Rest, [Ch|Acc]).
  
  
  
negative.code:     end.
  
  
  
  %% @private
  -spec parse_id(nksip:id()) ->
      {nksip:app_id(), id(), nksip_dialog:id(), nksip:call_id()}.
  
  parse_id(<<"U_", SubsId:6/binary, $_, DialogId:6/binary, $_, App:7/binary, 
           $_, CallId/binary>>) ->
      AppId = binary_to_existing_atom(App, latin1),
      {AppId, SubsId, DialogId, CallId}. 
  
  
  %% @private
  -spec make_id(nksip:request()) ->
      id().
  