anchor.diff:                       {'Destination-Host',  DH},
                        {'Destination-Realm', DR},
                        {'Auth-Application-Id', ?APP_ID}]).
  +
  +%% name/1
  +
  +name([H|_]) ->
  +    {list, H};
  +
  +name(#{} = Map) ->
  +    {map, maps:get(':name', Map)};
  +
  +name(Rec) ->
  +    {record, element(1, Rec)}.
   
   %% prepare_retransmit/5
   
  
positive.code:                      {'Origin-Realm', OR},
                       {'Destination-Realm', DR}]);
  
  prepare(#diameter_packet{msg = Req}, Caps, Group)
    when ?is_record(Req, diameter_base_ASR);
         ?is_record(Req, nas_ASR);
         'ASR' == hd(Req) ->
      #diameter_caps{origin_host  = {OH, DH},
                     origin_realm = {OR, DR}}
          = Caps,
  
negative.code:                      {'Destination-Realm', DR},
                       {'Auth-Application-Id', ?APP_ID}]);
  
  set(N, #diameter_packet{msg = Req}, Caps, Group)
    when N == {record, diameter_base_STR};
         N == {record, nas_STR};
         N == {map, 'STR'};
         N == {list, 'STR'} ->
      #diameter_caps{origin_host  = {OH, _},
                     origin_realm = {OR, DR}}
          = Caps,
  