Difference between revisions of "Structure of Config Files"

From AllStarLink Wiki
Jump to navigation Jump to search
imported>Wd6awp
imported>Wd6awp
Line 2: Line 2:
 
# A stanza is a section of the config file. It starts with a name (or number) surrounded by square brackets on a line by itself. A config file will have one or more stanza. Each stanza continues until the next stanza or end of file. Stanzas contain one or more ker/value pairs.  
 
# A stanza is a section of the config file. It starts with a name (or number) surrounded by square brackets on a line by itself. A config file will have one or more stanza. Each stanza continues until the next stanza or end of file. Stanzas contain one or more ker/value pairs.  
 
# Key/value pairs set various values such as the ID of the node.
 
# Key/value pairs set various values such as the ID of the node.
 +
 +
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:
 
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>
 
<pre>
 +
; Node 1998 Stanza
 
[1998]
 
[1998]
 
idrecording = |iW1ABC
 
idrecording = |iW1ABC
 
idtime = 540000  
 
idtime = 540000  
  
 +
; Node 1999 Stanza
 
[1999]
 
[1999]
 
idrecording = |iW1XYZ
 
idrecording = |iW1XYZ

Revision as of 15:13, 10 October 2017

Configuration files have a simple structure consisting of two parts, the stanza and key/value pairs.

  1. A stanza is a section of the config file. It starts with a name (or number) surrounded by square brackets on a line by itself. A config file will have one or more stanza. Each stanza continues until the next stanza or end of file. Stanzas contain one or more ker/value pairs.
  2. Key/value pairs set various values such as the ID of the node.

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:

; Node 1998 Stanza
[1998]
idrecording = |iW1ABC
idtime = 540000 

; Node 1999 Stanza
[1999]
idrecording = |iW1XYZ
idtime = 540000 

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