Yuan LIU
2007-Feb-04 15:27 UTC
[asterisk-users] Problem loading AstDB into variable on restart
I define [globals] myvar = ${DB(store/myvar)} --- But when I want to use ${myvar} in the dial plan, I found that the variable is null when Asterisk is restarted. Only a reload would force globals to read AstDB. Other variables in globals loads fine. Any idea? (Asterisk 1.2.13) Yuan Liu
Gordon Henderson
2007-Feb-05 08:56 UTC
[asterisk-users] Problem loading AstDB into variable on restart
On Sun, 4 Feb 2007, Yuan LIU wrote:> I define > > [globals] > myvar = ${DB(store/myvar)} > > --- > But when I want to use ${myvar} in the dial plan, I found that the variable > is null when Asterisk is restarted. Only a reload would force globals to > read AstDB. Other variables in globals loads fine. > > Any idea? (Asterisk 1.2.13)The DB module isn't loaded at asterisk boot time when the extensions.conf is parsed... I have the same problem, tried to fix it by forceloading the database modules, but either I didn't dully understand what it was doing, or it just didn't work, so my /etc/init.d script now has a wait for a couple of seconds after asterisk -p, then a asterisk -rx 'extensions reload' ... Not perfect and probably an abuse of the dialplan, but ... Gordon