DMRGateway Rewrite Rules¶
DMR networks reuse each other’s talkgroup numbers, so DMRGateway decides which network each call goes to by its rewrite rules. WPSD Palisade writes a standard set for you: your primary network’s talkgroups need no prefix, and every other network has its prefix digit (see DMR Networks and Talkgroup Prefixes). When you change the primary network and apply, the rules are rewritten to match.
Most people never need to touch them. This page is for when you do: a talkgroup you want to reach with a different number, a network the standard rules don’t cover, or a private master with its own numbering.
Tip
This reference is based on Jonathan Naylor’s documentation for DMRGateway. If a rule doesn’t behave as described here, check there for changes.
Adding your own rules¶
Add rules in Custom Settings, under the program DMRGateway. Don’t edit the file by hand: WPSD Palisade writes it again at every change, and a hand edit is lost.
Each network is a
[DMR Network N]section in the file; itsName=line says which network it is. Show the file in Custom Settings shows them all, with the rules WPSD Palisade already writes.Each rule is its own setting, named after its type and a number:
TGRewrite0,TGRewrite1and so on. To add a rule, use Add a setting with the next number not yet used in that section, such asTGRewrite5.To change one of the standard rules, customize it; to drop one, choose Leave it out of the file.
Your rules are tried when you apply them, like every custom setting: if DMRGateway won’t run with them, they’re switched off by themselves.
DMRGateway only passes traffic to a network that a rule sends it to.
Rule types¶
In the examples, the number after each rule name is left out for clarity (TGRewrite= stands for TGRewrite0=, TGRewrite1= and so on).
TGRewrite¶
Translates one talkgroup to another, and can change the timeslot. It also routes a talkgroup and timeslot to a particular network. From is the call as it comes from your radio (through MMDVM-Host); to is how it goes out to the network. The rule works in both directions.
TGRewrite=fromSlot,fromTG,toSlot,toTG,range
Translate a group call to talkgroup 8 into talkgroup 9 on this network:
[DMR Network 1]
TGRewrite=2,8,2,9,1
Send a group call to 9990 on timeslot 1 to network 1, and on timeslot 2 to network 2:
[DMR Network 1]
TGRewrite=1,9990,2,9990,1
[DMR Network 2]
TGRewrite=2,9990,2,9990,1
With a range above 1, a whole block of talkgroups is translated: this is how prefixes work. TGRewrite=2,5000001,2,1,999999 sends 5000001 to 5999999 on timeslot 2 to this network as 1 to 999999.
PCRewrite¶
Like TGRewrite, for private calls, and only from your radio to the network. Typically used to give a network’s reflector control numbers their own range, so they don’t clash, and to send GPS reports and private calls to a particular network.
PCRewrite=fromSlot,fromId,toSlot,toId,range
Send private calls on timeslot 2 to 94000-94999 to network 1 as 4000-4999, and 84000-84999 to network 2 as 4000-4999:
[DMR Network 1]
PCRewrite=2,94000,2,4000,1000
[DMR Network 2]
PCRewrite=2,84000,2,4000,1000
SrcRewrite¶
Rewrites the source of a call coming from the network, so it reaches your radio as a different ID. Network to radio only.
SrcRewrite=fromSlot,fromId,toSlot,toTG,range
Make reflector announcements from 4000-5000 on network 1 heard on talkgroup 9, timeslot 2:
[DMR Network 1]
SrcRewrite=2,4000,2,9,1001
TypeRewrite¶
Turns a group call into a private call. Radio to network only.
TypeRewrite=fromSlot,fromId,toSlot,toId
A group call to 9990 on timeslot 1 becomes a private call to 9990 (an echo service that expects private calls), and the SrcRewrite lets the reply back:
[DMR Network 1]
TypeRewrite=1,9990,1,9990
SrcRewrite=1,9990,1,9990,1
PassAllTG and PassAllPC¶
Pass every talkgroup (PassAllTG) or every private call (PassAllPC) on a timeslot that no other rule matches, in both directions. Only one network can have them: in WPSD Palisade’s standard rules, it’s the primary network, which is why its talkgroups need no prefix.
PassAllTG=slot
PassAllPC=slot
[DMR Network 2]
PassAllTG=1
PassAllTG=2
PassAllPC=1
PassAllPC=2
TGDynRewrite¶
Maps a block of dynamic talkgroups onto a single talkgroup, with spoken confirmations and control by private call. Designed for one particular network’s dynamic talkgroups, and of limited use elsewhere.
TGDynRewrite=slot,startTG,disconnectPC,statusPC,commsTG,count
TGDynRewrite=2,23500,4000,5000,9,100
All on timeslot 2:
23500 and 100: the dynamic talkgroups 23500 to 23599. Make a private call to one of them to select it; you hear a confirmation.
4000: a private call here disconnects the dynamic talkgroup, with a confirmation.
5000: a private call here tells you which one is selected.
9: the talkgroup you talk on to reach the selected one, and where the confirmations are heard.
Private calls are used because many radios can dial them from the keypad.
IdRewrite¶
Rewrites your radio’s DMR ID to a different one on the network, and back for calls from the network. Use it to keep a single DMR ID in your radio while presenting another to a network.
IdRewrite=radioId,networkId
IdRewrite=5059876,1001234
Your radio’s 5059876 reaches the network as 1001234.