(No difference)

Latest revision as of 09:02, 16 February 2016

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

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

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


  1. return header

end </syntaxhighlight>

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

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

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


  1. return header

end </syntaxhighlight>