Skip navigation.
The fusion of 2-way radio systems and VOIP

Macros

Macros are used to group several commands together. You can use them to send long sequences of commands. There are two types of macros in app_rpt. Function Macros and the Startup Macro


Function Macros

To implement function macros, you must define a macro stanza and reference it in your node stanza like this:

[1999]
.
.
macro = mymacros
.
.
.

Now that you have made a reference to a macro stanza, you need to define the stanza itself and put some macros in it:

[mymacros]
1 = *954*89*931001#      ; All links off (local only mode
2 = *954*9532000*9532011*989132*89*931000#  ; Site normal
3 = *955*89*931002#      ; Restore all links

The above macro stanza contains three macros. These macros consist of a numerical identifier on the left hand side of the equals sign, and a string of DTMF commands you want to execute, terminated with a '#' character on the right hand side of the equals sign.

Now we need an entry in the function table to point to the macro method so that we can assign a DTMF prefix for the macros to use:

[functions]
.
.
.
5 = macro
.
.
.

The function decoder in app_rpt usually assumes that all DTMF functions begin with '*' unless configured otherwise, The prefix digit 5 will follow the star to signify that this is to be a macro, and the digits which follow the prefix digit will be the macro number to execute in the macro stanza. So to access these macros, the user would dial *51, *52 or *53.


Startup Macro

Additionally, there is one macro type which can executed once on system startup. Each node can have one startup macro defined in its node stanza.
To define the startup macro, place the something similar to this in your node stanza:

startup_macro=*9532011*9532000

This example executes two DTMF commands to establish two links at startup. The startup macro does not require a trailing # like a function macro.

Functions

in the [functions] stanza, macros should be macro, ie 5 = macro.

macros

Thanks for catching that!

Recent comments