Structure of Config Files: Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
imported>Wd6awp
Created page with "Configuration files have a simple structure consisting of two parts: # A stanza is a section header which is a name (or number) surrounded by square brackets. A stanza is also..."
 
No edit summary
 
(28 intermediate revisions by one other user not shown)
Line 1: Line 1:
Configuration files have a simple structure consisting of two parts:
Configuration files have a simple structure consisting of stanzas, key/value pairs and comments. A stanza is a block of text within a configuration file. It starts with a name (or number) surrounded by square brackets on a line by itself. Configuration files will have one or more stanzas. Each stanza continues until the next stanza or end of file.
# A stanza is a section header which is a name (or number) surrounded by square brackets. A stanza is also called a context in Asterisk PBX terminology. Stanzas contain one or more ker/valus pairs.
<pre>
# Key/value pairs which set various values such as the ID of the node.
[this is a stanza]
...


For example,
[this is another stanza]
...
</pre>
Stanzas contain one or more ker/value pairs. Key/value pairs set various values within each stanza.
<pre>
myname=timothy ; There are some who call me Tim?
</pre>
 
Config file comments are preceded with a semicolon. In this example of two nodes the stanza is the node number and the key/value pairs set the CW ID and the ID timer:
 
<pre>
[1998]
idrecording = |iW1ABC
idtime = 540000          ; 9 minutes
 
[1999]
idrecording = |iW1XYZ
idtime = 540000
</pre>
 
==Settings to name other Stanzas==
Some key=value pairs point to other stanzas. This allows nodes on the same server to have the same settings (without duplicate entries) or different settings in some cases. For example the phone patch command may be *6 on one node, yet *61 on another.
 
For example:
<pre>
[1000]
functions=functionsVHF
 
[1001]
functions=functionsVHF  ;same functions as node 1000
 
[1002]
functions=functionsUHF
 
[functionsVHF]
; Two meter Autopatch up is *6
6=autopatchup,noct=1,farenddisconnect=1,dialtime=20000
0=autopatchdn      ; Autopatch down
 
[functionsUHF]
; 440 Autopatch up is *61
61=autopatchup,noct=1,farenddisconnect=1,dialtime=20000  ; Autopatch up
0=autopatchdn      ; Autopatch down
</pre>
 
==Named Stanzas in rpt.conf==
* controlstates=
* functions=
* link_functions=
* macro=
* phone_functions=
* telemetry=
* wait_times=
 
''Note:'' A stanza is also called a context in Asterisk PBX terminology, particularly related to the dialplan.
[[Category: Node Configuration]]
[[Category: How to]]

Latest revision as of 01:10, 20 January 2021

Configuration files have a simple structure consisting of stanzas, key/value pairs and comments. A stanza is a block of text within a configuration file. It starts with a name (or number) surrounded by square brackets on a line by itself. Configuration files will have one or more stanzas. Each stanza continues until the next stanza or end of file.

[this is a stanza]
...

[this is another stanza]
...

Stanzas contain one or more ker/value pairs. Key/value pairs set various values within each stanza.

myname=timothy ; There are some who call me Tim?

Config file comments are preceded with a semicolon. In this example of two nodes the stanza is the node number and the key/value pairs set the CW ID and the ID timer:

[1998]
idrecording = |iW1ABC
idtime = 540000          ; 9 minutes

[1999]
idrecording = |iW1XYZ
idtime = 540000 

Settings to name other Stanzas

Some key=value pairs point to other stanzas. This allows nodes on the same server to have the same settings (without duplicate entries) or different settings in some cases. For example the phone patch command may be *6 on one node, yet *61 on another.

For example:

[1000]
functions=functionsVHF

[1001]
functions=functionsVHF   ;same functions as node 1000

[1002]
functions=functionsUHF

[functionsVHF]
; Two meter Autopatch up is *6
6=autopatchup,noct=1,farenddisconnect=1,dialtime=20000 
0=autopatchdn       ; Autopatch down

[functionsUHF]
; 440 Autopatch up is *61
61=autopatchup,noct=1,farenddisconnect=1,dialtime=20000  ; Autopatch up
0=autopatchdn       ; Autopatch down

Named Stanzas in rpt.conf

  • controlstates=
  • functions=
  • link_functions=
  • macro=
  • phone_functions=
  • telemetry=
  • wait_times=

Note: A stanza is also called a context in Asterisk PBX terminology, particularly related to the dialplan.