System information
from the Asterisk CLI, or reload the module associated with the configuration file (e.g.,
using module reload chan_sip.so).
When using static realtime, we tell Asterisk which files we want to load from the da-
tabase using the following syntax in the extconfig.conf file:
; /etc/asterisk/extconfig.conf
filename.conf => driver,database[,table]
If the table name is not specified, Asterisk will use the name of the file
as the table name instead.
The static realtime module uses a specifically formatted table to read the configuration
of static files in from the database. Table 16-2 illustrates the columns as they should
be defined in your database:
Table 16-2. Table layout and description of ast_config
Column name Column type Description
id Serial, auto-
incrementing
An auto-incrementing unique value for each row in the table.
cat_metric Integer The weight of the category within the file. A lower metric means it appears higher in
the file (see the sidebar on page 370).
var_metric Integer The weight of an item within a category. A lower metric means it appears higher in the
list (see the sidebar on page 370). This is useful for things like codec order in sip.conf, or
iax.conf where you want disallow=all to appear first (metric of 0), followed by
allow=ulaw (metric of 1), then allow=gsm (metric of 2).
filename Varchar 128 The filename the module would normally read from the hard drive of your system (e.g.,
musiconhold.conf, sip.conf, iax.conf, etc.).
category Varchar 128 The section name within the file, such as [general]. Do not include the square
brackets around the name when saving to the database.
var_name Varchar 128 The option on the left side of the equals sign (e.g., disallow is the var_name in
disallow=all).
var_val Varchar 128 The value of an option on the right side of the equals sign (e.g., all is the var_val
in disallow=all).
commented Integer Any value other than 0 will evaluate as if it were prefixed with a semicolon in the flat
file (commented out).
Using Realtime | 369