<syntaxhighlight lang="lua"> require("Core") require("DMR")

function handleCallData(flavor, source, destination, tag, header)

   *** This function is called from LoopBack link while processing call headers
     flavor - set of bits that defines call type, see SESSION_TYPE_FLAG_*
     source - source ID of call
     destination - destination ID of call
     tag - route tag
     header - binary string contains FullLC, DataHeader or CSBK
     Modified DMR header
 -- Simple rule to replace destination ID of group voice call
 if (bit.band(flavor, SESSION_TYPE_FLAG_VOICE) ~= 0) and
    (bit.band(flavor, SESSION_TYPE_FLAG_GROUP) ~= 0) and
    (tag < 999999)
   return setVoiceCallDestinationID(header, tag)

 return header

end </syntaxhighlight>