ODBC/HASH in globals?

I have several questions, is [globals] in extensions.conf read only once (on a reload or startup) or on a new channel? Also can you use ODBC and assign global HASH variables as well? I would like to read some global information out of a mysql db that will not be changing very often (like trunk perimeters) so I should only need to read it once on a reload instead of every channel being created. (Also cut down on the SQL querys) Along with that can you have a routine in the [globals] section also, as setting some of the variables will require recursion. Thanks! - Jeremy

All extensions.conf is read only once in the following two cases:

  • when Asterisk starts
  • when you issue a command “dialplan reload”